@ -744,6 +744,7 @@ RSpec.describe Validations::Sales::SaleInformationValidations do
expect(record.errors["value"]).toinclude("The mortgage and deposit added together is £15,000.00 and the purchase price times by the equity is £8,400.00. These figures should be the same.")
expect(record.errors["deposit"]).toinclude("The mortgage and deposit added together is £15,000.00 and the purchase price times by the equity is £8,400.00. These figures should be the same.")
expect(record.errors["equity"]).toinclude("The mortgage and deposit added together is £15,000.00 and the purchase price times by the equity is £8,400.00. These figures should be the same.")
expect(record.errors["type"]).toinclude("The mortgage and deposit added together is £15,000.00 and the purchase price times by the equity is £8,400.00. These figures should be the same.")
end
end
@ -758,6 +759,23 @@ RSpec.describe Validations::Sales::SaleInformationValidations do
expect(record.errors["value"]).tobe_empty
expect(record.errors["deposit"]).tobe_empty
expect(record.errors["equity"]).tobe_empty
expect(record.errors["type"]).tobe_empty
end
end
context"and it is not a staircase transaction with social homebuy"do
@ -771,6 +789,7 @@ RSpec.describe Validations::Sales::SaleInformationValidations do
expect(record.errors["value"]).tobe_empty
expect(record.errors["deposit"]).tobe_empty
expect(record.errors["equity"]).tobe_empty
expect(record.errors["type"]).tobe_empty
end
end
@ -791,6 +810,7 @@ RSpec.describe Validations::Sales::SaleInformationValidations do
expect(record.errors["value"]).toinclude("The deposit is £5,000.00 and the purchase price times by the equity is £8,400.00. As no mortgage was used, these figures should be the same.")
expect(record.errors["deposit"]).toinclude("The deposit is £5,000.00 and the purchase price times by the equity is £8,400.00. As no mortgage was used, these figures should be the same.")
expect(record.errors["equity"]).toinclude("The deposit is £5,000.00 and the purchase price times by the equity is £8,400.00. As no mortgage was used, these figures should be the same.")
expect(record.errors["type"]).toinclude("The deposit is £5,000.00 and the purchase price times by the equity is £8,400.00. As no mortgage was used, these figures should be the same.")
end
end
@ -805,6 +825,7 @@ RSpec.describe Validations::Sales::SaleInformationValidations do
expect(record.errors["value"]).tobe_empty
expect(record.errors["deposit"]).tobe_empty
expect(record.errors["equity"]).tobe_empty
expect(record.errors["type"]).tobe_empty
end
end
end
@ -818,6 +839,7 @@ RSpec.describe Validations::Sales::SaleInformationValidations do