From 4ac96bc51a0569177ffad757f681d1378d085ad3 Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Fri, 11 Nov 2022 15:45:45 +0000 Subject: [PATCH] test: pick the simplest format for the tag helper tests --- spec/helpers/tag_helper_spec.rb | 35 +++------------------------------ 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/spec/helpers/tag_helper_spec.rb b/spec/helpers/tag_helper_spec.rb index f24715d7f..ffd20fa35 100644 --- a/spec/helpers/tag_helper_spec.rb +++ b/spec/helpers/tag_helper_spec.rb @@ -9,39 +9,10 @@ RSpec.describe TagHelper do expect(status_tag(lettings_log.status)).to eq("In progress") end - context "when status is 'Not started'" do - it "returns tag with correct status text and colour and custom class" do - expect(status_tag("not_started", "app-tag--small")).to eq("Not started") - end + it "returns tag with correct status text and colour and custom class" do + expect(status_tag("not_started", "app-tag--small")).to eq("Not started") + expect(status_tag("cannot_start_yet", "app-tag--small")).to eq("Cannot start yet") end - - context "when status is 'Cannot start yet'" do - it "returns tag with correct status text and colour and custom class" do - expect(status_tag("cannot_start_yet", "app-tag--small")).to eq("Cannot start yet") - end - end - - context "when status is 'Not started'" do - it "returns tag with correct status text and colour and custom class" do - code = "not_started" - text = "Not started" - colour = "grey" - expect(status_tag(code, "app-tag--small")).to eq("#{text}") - end - end - - context "when status is 'Cannot start yet'" do - it "returns tag with correct status text and colour and custom class" do - code = "cannot_start_yet" - text = "Cannot start yet" - colour = "grey" - expect(status_tag(code, "app-tag--small")).to eq("#{text}") - end - - it "returns tag with correct status text and colour and custom class" do - expect(status_tag("not_started", "app-tag--small")).to eq("Not started") - expect(status_tag("cannot_start_yet", "app-tag--small")).to eq("Cannot start yet") - end end end end