|
|
@ -789,5 +789,41 @@ RSpec.describe BulkUpload::Sales::Year2023::RowParser do |
|
|
|
expect(parser.log.soctenant).to be(1) |
|
|
|
expect(parser.log.soctenant).to be(1) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe "with living before purchase years for shared ownership more than 0" do |
|
|
|
|
|
|
|
let(:attributes) { setup_section_params.merge({ field_7: "1", field_86: "1" }) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "is sets living before purchase asked to yes and sets the correct living before purchase years" do |
|
|
|
|
|
|
|
expect(parser.log.proplen_asked).to be(0) |
|
|
|
|
|
|
|
expect(parser.log.proplen).to be(1) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe "with living before purchase years for discounted ownership more than 0" do |
|
|
|
|
|
|
|
let(:attributes) { setup_section_params.merge({ field_7: "2", field_115: "1" }) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "is sets living before purchase asked to yes and sets the correct living before purchase years" do |
|
|
|
|
|
|
|
expect(parser.log.proplen_asked).to be(0) |
|
|
|
|
|
|
|
expect(parser.log.proplen).to be(1) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe "with living before purchase years for shared ownership set to 0" do |
|
|
|
|
|
|
|
let(:attributes) { setup_section_params.merge({ field_7: "1", field_86: "0" }) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "is sets living before purchase asked to no" do |
|
|
|
|
|
|
|
expect(parser.log.proplen_asked).to be(1) |
|
|
|
|
|
|
|
expect(parser.log.proplen).to be_nil |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe "with living before purchase 0 years for discounted ownership set to 0" do |
|
|
|
|
|
|
|
let(:attributes) { setup_section_params.merge({ field_7: "2", field_115: "0" }) } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it "is sets living before purchase asked to no" do |
|
|
|
|
|
|
|
expect(parser.log.proplen_asked).to be(1) |
|
|
|
|
|
|
|
expect(parser.log.proplen).to be_nil |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|