expect(record.errors["mortgage"]).toinclude("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["value"]).toinclude("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["deposit"]).toinclude("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["stairbought"]).toinclude("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["type"]).toinclude("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["cashdis"]).not_toinclude("The mortgage (£10,000.00) and cash deposit (£5,000.00) added together is £15,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
end
end
context"and it is a social homebuy"do
context"and it is a social homebuy"do
@ -1103,12 +1102,12 @@ RSpec.describe Validations::Sales::SaleInformationValidations do
expect(record.errors["mortgage"]).toinclude("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["value"]).toinclude("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["deposit"]).toinclude("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["stairbought"]).toinclude("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["cashdis"]).toinclude("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["type"]).toinclude("The mortgage amount (£10,000.00), cash deposit (£5,000.00), and cash discount (£200.00) added together is £15,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["mortgageused"]).toinclude("The cash deposit is £5,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["value"]).toinclude("The cash deposit is £5,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["deposit"]).toinclude("The cash deposit is £5,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["stairbought"]).toinclude("The cash deposit is £5,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["type"]).toinclude("The cash deposit is £5,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["cashdis"]).not_toinclude("The cash deposit is £5,000.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought is £8,400.00.</br></br>These two amounts should be the same.")
end
end
context"and it is a social homebuy"do
context"and it is a social homebuy"do
@ -1222,12 +1220,12 @@ RSpec.describe Validations::Sales::SaleInformationValidations do
expect(record.errors["mortgageused"]).toinclude("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["value"]).toinclude("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["deposit"]).toinclude("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["stairbought"]).toinclude("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["cashdis"]).toinclude("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")
expect(record.errors["type"]).toinclude("The cash deposit (£5,000.00) and cash discount (£200.00) added together is £5,200.00.</br></br>The full purchase price (£30,000.00) multiplied by the percentage bought (28%) is £8,400.00.</br></br>These two amounts should be the same.")