diff --git a/spec/helpers/tag_helper_spec.rb b/spec/helpers/tag_helper_spec.rb index 3f32b8502..f24715d7f 100644 --- a/spec/helpers/tag_helper_spec.rb +++ b/spec/helpers/tag_helper_spec.rb @@ -9,8 +9,39 @@ RSpec.describe TagHelper do expect(status_tag(lettings_log.status)).to eq("In progress") 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") + 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 + 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