@ -497,7 +497,41 @@ RSpec.describe Exports::LettingsLogExportService do
end
context"and one lettings log is available for export"do
let!(:lettings_log){FactoryBot.create(:lettings_log,:completed,startdate:Time.zone.local(2026,4,3),assigned_to:user,age1:35,sexrab1:"F",sex1:"F",age2:32,sexrab2:"M",sex2:"M",ppostcode_full:"A1 1AA",nationality_all_group:13,propcode:"123",postcode_full:"SE2 6RT",tenancycode:"BZ737",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",manual_address_entry_selected:false,uprn:"1",uprn_known:1)}
let!(:lettings_log)do
FactoryBot.create(
:lettings_log,
:completed,
startdate:Time.zone.local(2026,4,3),
assigned_to:user,
age1:35,
sexrab1:"F",
sex1:"F",
age2:32,
sexrab2:"M",
sex2:"M",
ppostcode_full:"A1 1AA",
nationality_all_group:13,
propcode:"123",
postcode_full:"SE2 6RT",
tenancycode:"BZ737",
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",
"expected that unordered #{fix_xml_content_order(actual)} would be equal to unordered #{fix_xml_content_order(expected)}. Unique lines in actual: #{actual_unique_lines.join("\n")}. Unique lines in expected: #{expected_unique_lines.join("\n")}"