|
|
|
@ -566,6 +566,27 @@ RSpec.describe Imports::LettingsLogsImportService do |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context "and the number of times the property was relet is a non nil string that is nil as a BigDecimal" do |
|
|
|
|
|
|
|
before do |
|
|
|
|
|
|
|
lettings_log_xml.at_xpath("//xmlns:Q20").content = "a" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "doesn't throw an error" do |
|
|
|
|
|
|
|
expect { lettings_log_service.send(:create_log, lettings_log_xml) } |
|
|
|
|
|
|
|
.not_to raise_error |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "clears out the number offered answer" do |
|
|
|
|
|
|
|
allow(logger).to receive(:warn) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lettings_log_service.send(:create_log, lettings_log_xml) |
|
|
|
|
|
|
|
lettings_log = LettingsLog.find_by(old_id: lettings_log_id) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
expect(lettings_log).not_to be_nil |
|
|
|
|
|
|
|
expect(lettings_log.offered).to be_nil |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
context "and the gender identity is refused" do |
|
|
|
context "and the gender identity is refused" do |
|
|
|
before do |
|
|
|
before do |
|
|
|
lettings_log_xml.at_xpath("//xmlns:P1Sex").content = "Person prefers not to say" |
|
|
|
lettings_log_xml.at_xpath("//xmlns:P1Sex").content = "Person prefers not to say" |
|
|
|
|