|
|
|
@ -825,5 +825,35 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do |
|
|
|
expect(parser.log.proplen).to be_nil |
|
|
|
expect(parser.log.proplen).to be_nil |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context "when mscharge is given, but is set to 0 for shared ownership" do |
|
|
|
|
|
|
|
let(:attributes) { valid_attributes.merge(field_114: "0") } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "does not override variables correctly" do |
|
|
|
|
|
|
|
log = parser.log |
|
|
|
|
|
|
|
expect(log["has_mscharge"]).to eq(0) # no |
|
|
|
|
|
|
|
expect(log["mscharge"]).to be_nil |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context "when mscharge is given, but is set to 0 for discounted ownership" do |
|
|
|
|
|
|
|
let(:attributes) { valid_attributes.merge(field_7: "2", field_126: "0") } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "does not override variables correctly" do |
|
|
|
|
|
|
|
log = parser.log |
|
|
|
|
|
|
|
expect(log["has_mscharge"]).to eq(0) # no |
|
|
|
|
|
|
|
expect(log["mscharge"]).to be_nil |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
context "when mscharge is given, but is set to 0 for outright sale" do |
|
|
|
|
|
|
|
let(:attributes) { valid_attributes.merge(field_7: "3", field_135: "0") } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "does not override variables correctly" do |
|
|
|
|
|
|
|
log = parser.log |
|
|
|
|
|
|
|
expect(log["has_mscharge"]).to eq(0) # no |
|
|
|
|
|
|
|
expect(log["mscharge"]).to be_nil |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|