Browse Source

test: all status tag helpers

pull/987/head
Sam Seed 4 years ago
parent
commit
bd8de451c8
  1. 9
      spec/helpers/tag_helper_spec.rb

9
spec/helpers/tag_helper_spec.rb

@ -12,7 +12,14 @@ RSpec.describe TagHelper do
it "returns tag with correct status text and colour and custom class" do it "returns tag with correct status text and colour and custom class" do
expect(status_tag("not_started", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--grey app-tag--small\">Not started</strong>") expect(status_tag("not_started", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--grey app-tag--small\">Not started</strong>")
expect(status_tag("cannot_start_yet", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--grey app-tag--small\">Cannot start yet</strong>") expect(status_tag("cannot_start_yet", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--grey app-tag--small\">Cannot start yet</strong>")
end expect(status_tag("in_progress", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--blue app-tag--small\">In progress</strong>")
expect(status_tag("completed", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--green app-tag--small\">Completed</strong>")
expect(status_tag("active", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--green app-tag--small\">Active</strong>")
expect(status_tag("incomplete", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--red app-tag--small\">Incomplete</strong>")
expect(status_tag("activating_soon", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--blue app-tag--small\">Activating soon</strong>")
expect(status_tag("reactivating_soon", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--blue app-tag--small\">Reactivating soon</strong>")
expect(status_tag("deactivating_soon", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--yellow app-tag--small\">Deactivating soon</strong>")
expect(status_tag("deactivated", "app-tag--small")).to eq("<strong class=\"govuk-tag govuk-tag--grey app-tag--small\">Deactivated</strong>")
end end
end end
end end

Loading…
Cancel
Save