Browse Source

CLDC-3304: Add bulk upload id to xml exports from 2024

pull/2323/head
Rachael Booth 2 years ago
parent
commit
058c4f5faf
  1. 6
      app/services/exports/lettings_log_export_constants.rb
  2. 3
      spec/fixtures/exports/general_needs_log_24_25.xml
  3. 2
      spec/services/exports/lettings_log_export_service_spec.rb

6
app/services/exports/lettings_log_export_constants.rb

@ -140,7 +140,8 @@ module Exports::LettingsLogExportConstants
"amended_by",
"duplicate_set_id",
"accessible_register",
"nationality_all"
"nationality_all",
"bulk_upload_id",
]
(1..8).each do |index|
@ -160,7 +161,8 @@ module Exports::LettingsLogExportConstants
POST_2024_EXPORT_FIELDS = Set[
"accessible_register",
"nationality_all"
"nationality_all",
"bulk_upload_id",
]
PRE_2024_EXPORT_FIELDS = Set[

3
spec/fixtures/exports/general_needs_log_24_25.xml vendored

@ -134,6 +134,7 @@
<hhtype>4</hhtype>
<new_old>2</new_old>
<vacdays>698</vacdays>
<bulk_upload_id>1</bulk_upload_id>
<uprn/>
<uprn_known>0</uprn_known>
<uprn_confirmed/>
@ -142,7 +143,7 @@
<town_or_city>London</town_or_city>
<county/>
<discarded_at/>
<creation_method>1</creation_method>
<creation_method>2</creation_method>
<duplicate_set_id/>
<accessible_register>2</accessible_register>
<nationality_all/>

2
spec/services/exports/lettings_log_export_service_spec.rb

@ -472,7 +472,7 @@ RSpec.describe Exports::LettingsLogExportService do
end
context "and one lettings log is available for export" do
let!(:lettings_log) { FactoryBot.create(:lettings_log, :completed, created_by: user, ppostcode_full: "A1 1AA", nationality_all_group: 13, propcode: "123", postcode_full: "SE2 6RT", tenancycode: "BZ737", startdate: Time.zone.local(2024, 4, 2, 10, 36, 49), voiddate: Time.zone.local(2021, 11, 3), mrcdate: Time.zone.local(2022, 5, 5, 10, 36, 49), tenancylength: 5, underoccupation_benefitcap: 4) }
let!(:lettings_log) { FactoryBot.create(:lettings_log, :completed, created_by: user, ppostcode_full: "A1 1AA", nationality_all_group: 13, propcode: "123", postcode_full: "SE2 6RT", tenancycode: "BZ737", startdate: Time.zone.local(2024, 4, 2, 10, 36, 49), voiddate: Time.zone.local(2021, 11, 3), mrcdate: Time.zone.local(2022, 5, 5, 10, 36, 49), tenancylength: 5, underoccupation_benefitcap: 4, creation_method: 2, bulk_upload_id: 1) }
let(:expected_zip_filename) { "core_2024_2025_apr_mar_f0001_inc0001.zip" }
let(:expected_data_filename) { "core_2024_2025_apr_mar_f0001_inc0001_pt001.xml" }
let(:xml_export_file) { File.open("spec/fixtures/exports/general_needs_log_24_25.xml", "r:UTF-8") }

Loading…
Cancel
Save