diff --git a/config/locales/petitions.en-GB.yml b/config/locales/petitions.en-GB.yml index 1459ad02a..aca62bdad 100644 --- a/config/locales/petitions.en-GB.yml +++ b/config/locales/petitions.en-GB.yml @@ -100,6 +100,7 @@ en-GB: - :with_response - :awaiting_debate - :debated + - :not_debated admin_archived: - :all - :published @@ -110,6 +111,7 @@ en-GB: - :with_response - :awaiting_debate - :debated + - :not_debated names: admin: all: "All petitions (%{quantity})" @@ -131,6 +133,7 @@ en-GB: with_response: "With a government response (%{quantity})" awaiting_debate: "Awaiting a debate in parliament (%{quantity})" debated: "Has been debated in parliament (%{quantity})" + not_debated: "Has not been debated in parliament (%{quantity})" admin_archived: all: "All petitions (%{quantity})" published: "Published (%{quantity})" @@ -141,7 +144,7 @@ en-GB: with_response: "With a government response (%{quantity})" awaiting_debate: "Awaiting a debate in parliament (%{quantity})" debated: "Has been debated in parliament (%{quantity})" - + not_debated: "Has not been debated in parliament (%{quantity})" emails: subjects: # Emails to people who sign petitions diff --git a/spec/helpers/admin_helper_spec.rb b/spec/helpers/admin_helper_spec.rb index 94ea3b9d5..158ced9ce 100644 --- a/spec/helpers/admin_helper_spec.rb +++ b/spec/helpers/admin_helper_spec.rb @@ -11,14 +11,14 @@ overdue_in_moderation: 8, tagged_in_moderation: 9, untagged_in_moderation: 10, open: 11, closed: 12, rejected: 13, hidden: 14, stopped: 15, awaiting_response: 16, with_response: 17, awaiting_debate: 18, - debated: 19 + debated: 19, not_debated: 20 } end subject { helper.admin_petition_facets_for_select(facets, selected) } it "generates the correct number of options" do - expect(subject).to have_css("option", count: 19) + expect(subject).to have_css("option", count: 20) end it "generates the correct option for 'all'" do @@ -97,6 +97,10 @@ expect(subject).to have_css("option:nth-of-type(19)[value='debated']", text: "Has been debated in parliament (19)") end + it "generates the correct option for 'not_debated'" do + expect(subject).to have_css("option:nth-of-type(20)[value='not_debated']", text: "Has not been debated in parliament (20)") + end + it "marks the correct option as selected" do expect(subject).to have_css("option[value='open'][selected]") end