@check_answer_label="Buyer was a registered provider, housing association or local authority tenant immediately before this sale?"
@header="Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?"
@check_answer_label="#{joint_purchase?'Any buyers were':'Buyer was a'} registered provider#{'s'ifjoint_purchase}, housing association or local authority tenant#{'s'ifjoint_purchase} immediately before this sale?"
@header="#{joint_purchase?'Were any of the buyers':'Was the buyer a'} private registered provider#{'s'ifjoint_purchase}, housing association or local authority tenant#{'s'ifjoint_purchase} immediately before this sale?"
@ -15,12 +16,26 @@ RSpec.describe Form::Sales::Questions::BuyerPrevious, type: :model do
expect(question.id).toeq("soctenant")
end
it"has the correct header"do
expect(question.header).toeq("Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?")
context"when a joint purchase"do
it"has the correct header"do
expect(question.header).toeq("Were any of the buyers private registered providers, housing association or local authority tenants immediately before this sale?")
end
it"has the correct check_answer_label"do
expect(question.check_answer_label).toeq("Any buyers were registered providers, housing association or local authority tenants immediately before this sale?")
end
end
it"has the correct check_answer_label"do
expect(question.check_answer_label).toeq("Buyer was a registered provider, housing association or local authority tenant immediately before this sale?")
context"when not a joint purchase"do
let(:joint_purchase){false}
it"has the correct header"do
expect(question.header).toeq("Was the buyer a private registered provider, housing association or local authority tenant immediately before this sale?")
end
it"has the correct check_answer_label"do
expect(question.check_answer_label).toeq("Buyer was a registered provider, housing association or local authority tenant immediately before this sale?")