Browse Source

Make sure we pass an integer to export_xml_lettings_logs (#1880)

pull/1883/head v0.3.52
kosiakkatrina 1 year ago committed by GitHub
parent
commit
3c0a644e08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      lib/tasks/data_export.rake
  2. 2
      spec/lib/tasks/data_export_spec.rb

2
lib/tasks/data_export.rake

@ -13,7 +13,7 @@ namespace :core do
desc "Export all data XMLs for import into Central Data System (CDS)" desc "Export all data XMLs for import into Central Data System (CDS)"
task :full_data_export_xml, %i[year] => :environment do |_task, args| task :full_data_export_xml, %i[year] => :environment do |_task, args|
collection_year = args[:year].presence collection_year = args[:year].present? ? args[:year].to_i : nil
storage_service = Storage::S3Service.new(PlatformHelper.is_paas? ? Configuration::PaasConfigurationService.new : Configuration::EnvConfigurationService.new, ENV["EXPORT_PAAS_INSTANCE"]) storage_service = Storage::S3Service.new(PlatformHelper.is_paas? ? Configuration::PaasConfigurationService.new : Configuration::EnvConfigurationService.new, ENV["EXPORT_PAAS_INSTANCE"])
export_service = Exports::LettingsLogExportService.new(storage_service) export_service = Exports::LettingsLogExportService.new(storage_service)

2
spec/lib/tasks/data_export_spec.rb

@ -42,7 +42,7 @@ describe "rake core:data_export", type: task do
it "calls the export service" do it "calls the export service" do
expect(export_service).to receive(:export_xml_lettings_logs).with(full_update: true, collection_year: 2022) expect(export_service).to receive(:export_xml_lettings_logs).with(full_update: true, collection_year: 2022)
task.invoke(2022) task.invoke("2022")
end end
end end
end end

Loading…
Cancel
Save