Browse Source

CLDC-3304: Add bulk upload id to xml exports from 2024 (#2323)

pull/2308/head
Rachael Booth 9 months ago committed by GitHub
parent
commit
9dc37f7fff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      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

2
app/services/exports/lettings_log_export_constants.rb

@ -141,6 +141,7 @@ module Exports::LettingsLogExportConstants
"duplicate_set_id", "duplicate_set_id",
"accessible_register", "accessible_register",
"nationality_all", "nationality_all",
"bulk_upload_id",
"address_line1_as_entered", "address_line1_as_entered",
"address_line2_as_entered", "address_line2_as_entered",
"town_or_city_as_entered", "town_or_city_as_entered",
@ -167,6 +168,7 @@ module Exports::LettingsLogExportConstants
POST_2024_EXPORT_FIELDS = Set[ POST_2024_EXPORT_FIELDS = Set[
"accessible_register", "accessible_register",
"nationality_all", "nationality_all",
"bulk_upload_id",
"address_line1_as_entered", "address_line1_as_entered",
"address_line2_as_entered", "address_line2_as_entered",
"town_or_city_as_entered", "town_or_city_as_entered",

3
spec/fixtures/exports/general_needs_log_24_25.xml vendored

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

2
spec/services/exports/lettings_log_export_service_spec.rb

@ -472,7 +472,7 @@ RSpec.describe Exports::LettingsLogExportService do
end end
context "and one lettings log is available for export" do 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, address_line1_as_entered: "address line 1 as entered", address_line2_as_entered: "address line 2 as entered", town_or_city_as_entered: "town or city as entered", county_as_entered: "county as entered", postcode_full_as_entered: "AB1 2CD", la_as_entered: "la as entered") } 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, address_line1_as_entered: "address line 1 as entered", address_line2_as_entered: "address line 2 as entered", town_or_city_as_entered: "town or city as entered", county_as_entered: "county as entered", postcode_full_as_entered: "AB1 2CD", la_as_entered: "la as entered") }
let(:expected_zip_filename) { "core_2024_2025_apr_mar_f0001_inc0001.zip" } 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(: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") } let(:xml_export_file) { File.open("spec/fixtures/exports/general_needs_log_24_25.xml", "r:UTF-8") }

Loading…
Cancel
Save