Merge branch 'dev'

This commit is contained in:
simon lehericey 2018-02-23 15:51:08 +01:00
commit d845c095d9
3 changed files with 5 additions and 5 deletions

View file

@ -95,7 +95,7 @@ client_secret: ''
AutoArchiveProcedureJob.set(cron: "* * * * *").perform_later AutoArchiveProcedureJob.set(cron: "* * * * *").perform_later
WeeklyOverviewJob.set(cron: "0 8 * * 0").perform_later WeeklyOverviewJob.set(cron: "0 8 * * 0").perform_later
AutoReceiveDossiersForProcedureJob.set(cron: "* * * * *").perform_later(procedure_declaratoire_id, "received") AutoReceiveDossiersForProcedureJob.set(cron: "* * * * *").perform_later(procedure_declaratoire_id, 'en_instruction')
FindDubiousProceduresJob.set(cron: "0 0 * * *").perform_later FindDubiousProceduresJob.set(cron: "0 0 * * *").perform_later
## Exécution des tests (RSpec) ## Exécution des tests (RSpec)

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