Browse Source

CLDC-3499: Remove unneeded old test from check answers summary list component spec

CLDC-3499-remove-pre-2025-tests
samyou-softwire 2 weeks ago
parent
commit
89858ea090
  1. 14
      spec/components/check_answers_summary_list_card_component_spec.rb

14
spec/components/check_answers_summary_list_card_component_spec.rb

@ -1,6 +1,8 @@
require "rails_helper" require "rails_helper"
RSpec.describe CheckAnswersSummaryListCardComponent, type: :component do RSpec.describe CheckAnswersSummaryListCardComponent, type: :component do
include CollectionTimeHelper
subject(:component) { described_class.new(questions:, log:, user:) } subject(:component) { described_class.new(questions:, log:, user:) }
let(:rendered) { render_inline(component) } 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") 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
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 end

Loading…
Cancel
Save