Browse Source

More fixes

pull/2672/head
Rachael Booth 9 months ago
parent
commit
bd69ec56d4
  1. 2
      app/models/form/question.rb
  2. 8
      spec/models/form/sales/pages/discounted_ownership_type_spec.rb

2
app/models/form/question.rb

@ -50,7 +50,7 @@ class Form::Question
delegate :form, to: :subsection delegate :form, to: :subsection
def check_answer_label def check_answer_label
return @check_answer_label if @copy_reference.nil? return @check_answer_label if @copy_key.nil?
I18n.t("forms.#{form.start_date.year}.#{@copy_key}.check_answer_label") I18n.t("forms.#{form.start_date.year}.#{@copy_key}.check_answer_label")
end end

8
spec/models/form/sales/pages/discounted_ownership_type_spec.rb

@ -16,14 +16,6 @@ RSpec.describe Form::Sales::Pages::DiscountedOwnershipType, type: :model do
expect(page.header).to eq("Type of discounted ownership sale") expect(page.header).to eq("Type of discounted ownership sale")
end end
end end
context "when form year is for before 2023/24" do
let(:start_date) { Time.zone.local(2022, 2, 8) }
it "does not have a page header" do
expect(page.header).to eq(nil)
end
end
end end
it "has correct subsection" do it "has correct subsection" do

Loading…
Cancel
Save