fetch effectifs mensuels for may month
This commit is contained in:
parent
2b2960f7a1
commit
954d41ce4e
2 changed files with 3 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
|||
class ApiEntreprise::EffectifsJob < ApiEntreprise::Job
|
||||
def perform(etablissement_id, procedure_id)
|
||||
etablissement = Etablissement.find(etablissement_id)
|
||||
# april 2020 is at the moment the most actual info for effectifs endpoint
|
||||
etablissement_params = ApiEntreprise::EffectifsAdapter.new(etablissement.siret, procedure_id, "2020", "04").to_params
|
||||
# may 2020 is at the moment the most actual info for effectifs endpoint
|
||||
etablissement_params = ApiEntreprise::EffectifsAdapter.new(etablissement.siret, procedure_id, "2020", "05").to_params
|
||||
etablissement.update!(etablissement_params)
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ RSpec.describe ApiEntreprise::EffectifsJob, type: :job do
|
|||
let(:procedure_id) { procedure.id }
|
||||
let(:now) { Time.zone.local(2020, 3, 12) }
|
||||
let(:annee) { "2020" }
|
||||
let(:mois) { "04" }
|
||||
let(:mois) { "05" }
|
||||
let(:body) { File.read('spec/fixtures/files/api_entreprise/effectifs.json') }
|
||||
let(:status) { 200 }
|
||||
|
||||
|
|
Loading…
Reference in a new issue