AutoReceivedDossiersForProcedure: fix job by changing symbole to string

This commit is contained in:
simon lehericey 2018-02-23 15:04:03 +01:00
parent cc5a729927
commit c94d57db79
2 changed files with 4 additions and 4 deletions

View file

@ -4,12 +4,12 @@ class AutoReceiveDossiersForProcedureJob < ApplicationJob
def perform(procedure_id, state) def perform(procedure_id, state)
procedure = Procedure.find(procedure_id) procedure = Procedure.find(procedure_id)
attrs = case state attrs = case state
when :en_instruction when 'en_instruction'
{ {
state: :en_instruction, state: :en_instruction,
en_instruction_at: DateTime.now en_instruction_at: DateTime.now
} }
when :accepte when 'accepte'
{ {
state: :accepte, state: :accepte,
en_instruction_at: DateTime.now, en_instruction_at: DateTime.now,

View file

@ -17,7 +17,7 @@ RSpec.describe AutoReceiveDossiersForProcedureJob, type: :job do
let(:procedure_id) { dossier_brouillon.procedure_id } let(:procedure_id) { dossier_brouillon.procedure_id }
context "en_construction" do context "en_construction" do
let(:state) { :en_instruction } let(:state) { 'en_instruction' }
it do it do
subject subject
@ -36,7 +36,7 @@ RSpec.describe AutoReceiveDossiersForProcedureJob, type: :job do
end end
context "accepte" do context "accepte" do
let(:state) { :accepte } let(:state) { 'accepte' }
it do it do
subject subject