diff --git a/spec/components/check_answers_summary_list_card_component_spec.rb b/spec/components/check_answers_summary_list_card_component_spec.rb index bbae4acff..68364542b 100644 --- a/spec/components/check_answers_summary_list_card_component_spec.rb +++ b/spec/components/check_answers_summary_list_card_component_spec.rb @@ -1,6 +1,8 @@ require "rails_helper" RSpec.describe CheckAnswersSummaryListCardComponent, type: :component do + include CollectionTimeHelper + subject(:component) { described_class.new(questions:, log:, user:) } let(:rendered) { render_inline(component) } @@ -64,16 +66,4 @@ RSpec.describe CheckAnswersSummaryListCardComponent, type: :component do expect(rendered).to have_link(log.form.get_question("tenancycode", log).check_answer_prompt, href: "/lettings-logs/#{log.id}/tenant-code?referrer=check_answers_new_answer", class: "govuk-link govuk-link--no-visited-state") end end - - context "when before 23/24 collection" do - context "when given a set of questions" do - let(:log) { create(:lettings_log, :completed, :ignore_validation_errors, age2: 99, startdate: Time.zone.local(2021, 5, 1), assigned_to: create(:user)) } - - it "renders a summary list card without question numbers for the answers to those questions" do - expect(rendered).to have_content(questions.first.answer_label(log)) - expect(rendered).to have_content("Lead tenant’s age") - expect(rendered).not_to include(" - Lead tenant’s age") - end - end - end end