expect(record.errors[:stairbought]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 90% for Shared Ownership (new model lease) sales.")
expect(record.errors[:type]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 90% for Shared Ownership (new model lease) sales.")
end
expect(record.errors[:stairbought]).toinclude("The percentage bought in this staircasing transaction cannot be higher than #{max}% for #{label} sales.")
expect(record.errors[:type]).toinclude("The percentage bought in this staircasing transaction cannot be higher than #{max}% for #{label} sales.")
end
context"when ownership type is Home ownership for people with Long-Term Disabilities (HOLD)"do
expect(record.errors[:stairbought]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 90% for Home Ownership for people with Long-Term Disabilities (HOLD) sales.")
expect(record.errors[:type]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 90% for Home Ownership for people with Long-Term Disabilities (HOLD) sales.")
end
end
context"when ownership type is Rent to Buy – shared ownership"do
expect(record.errors[:stairbought]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 90% for Rent to Buy — Shared Ownership sales.")
expect(record.errors[:type]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 90% for Rent to Buy — Shared Ownership sales.")
end
end
context"when ownership type is Right to Shared Ownership"do
expect(record.errors[:stairbought]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 90% for Right to Shared Ownership (RtSO) sales.")
expect(record.errors[:type]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 90% for Right to Shared Ownership (RtSO) sales.")
end
end
context"when ownership type is London Living Rent – shared ownership"do
expect(record.errors[:stairbought]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 90% for London Living Rent — Shared Ownership sales.")
expect(record.errors[:type]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 90% for London Living Rent — Shared Ownership sales.")
end
end
context"when ownership type is Shared Ownership (old model lease)"do
expect(record.errors[:stairbought]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 75% for Shared Ownership (old model lease) sales.")
expect(record.errors[:type]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 75% for Shared Ownership (old model lease) sales.")
end
end
context"when ownership type is Social Homebuy – shared ownership"do
expect(record.errors[:stairbought]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 75% for Social HomeBuy — shared ownership purchase sales.")
expect(record.errors[:type]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 75% for Social HomeBuy — shared ownership purchase sales.")
end
end
context"when ownership type is Older Persons shared ownership (OPSO)"do
expect(record.errors[:stairbought]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 50% for Older Persons Shared Ownership sales.")
expect(record.errors[:type]).toinclude("The percentage bought in this staircasing transaction cannot be higher than 50% for Older Persons Shared Ownership sales.")