|
6 | 6 |
|
7 | 7 | let(:facets) do |
8 | 8 | { |
9 | | - all: 1, collecting_sponsors: 2, in_moderation: 3, open: 4, |
10 | | - closed: 5, rejected: 6, hidden: 7, awaiting_response: 8, |
11 | | - with_response: 9, awaiting_debate_date: 10, |
12 | | - with_debate_outcome: 11, in_debate_queue: 12 |
| 9 | + all: 1, collecting_sponsors: 2, in_moderation: 3, open: 4, closed: 5, |
| 10 | + rejected: 6, hidden: 7, stopped: 8, awaiting_response: 9, with_response: 10, |
| 11 | + awaiting_debate_date: 11, with_debate_outcome: 12, in_debate_queue: 13 |
13 | 12 | } |
14 | 13 | end |
15 | 14 |
|
16 | 15 | subject { helper.admin_petition_facets_for_select(facets, selected) } |
17 | 16 |
|
18 | 17 | it "generates the correct number of options" do |
19 | | - expect(subject).to have_css("option", count: 12) |
| 18 | + expect(subject).to have_css("option", count: 13) |
20 | 19 | end |
21 | 20 |
|
22 | 21 | it "generates the correct option for 'all'" do |
|
47 | 46 | expect(subject).to have_css("option:nth-of-type(7)[value='hidden']", text: "Hidden (7)") |
48 | 47 | end |
49 | 48 |
|
| 49 | + it "generates the correct option for 'hidden'" do |
| 50 | + expect(subject).to have_css("option:nth-of-type(8)[value='stopped']", text: "Stopped (8)") |
| 51 | + end |
| 52 | + |
50 | 53 | it "generates the correct option for 'awaiting_response'" do |
51 | | - expect(subject).to have_css("option:nth-of-type(8)[value='awaiting_response']", text: "Awaiting a government response (8)") |
| 54 | + expect(subject).to have_css("option:nth-of-type(9)[value='awaiting_response']", text: "Awaiting a government response (9)") |
52 | 55 | end |
53 | 56 |
|
54 | 57 | it "generates the correct option for 'with_response'" do |
55 | | - expect(subject).to have_css("option:nth-of-type(9)[value='with_response']", text: "With a government response (9)") |
| 58 | + expect(subject).to have_css("option:nth-of-type(10)[value='with_response']", text: "With a government response (10)") |
56 | 59 | end |
57 | 60 |
|
58 | 61 | it "generates the correct option for 'awaiting_debate_date'" do |
59 | | - expect(subject).to have_css("option:nth-of-type(10)[value='awaiting_debate_date']", text: "Awaiting a debate in parliament (10)") |
| 62 | + expect(subject).to have_css("option:nth-of-type(11)[value='awaiting_debate_date']", text: "Awaiting a debate in parliament (11)") |
60 | 63 | end |
61 | 64 |
|
62 | 65 | it "generates the correct option for 'with_debate_outcome'" do |
63 | | - expect(subject).to have_css("option:nth-of-type(11)[value='with_debate_outcome']", text: "Has been debated in parliament (11)") |
| 66 | + expect(subject).to have_css("option:nth-of-type(12)[value='with_debate_outcome']", text: "Has been debated in parliament (12)") |
64 | 67 | end |
65 | 68 |
|
66 | 69 | it "generates the correct option for 'in_debate_queue'" do |
67 | | - expect(subject).to have_css("option:nth-of-type(12)[value='in_debate_queue']", text: "In debate queue (12)") |
| 70 | + expect(subject).to have_css("option:nth-of-type(13)[value='in_debate_queue']", text: "In debate queue (13)") |
68 | 71 | end |
69 | 72 |
|
70 | 73 | it "marks the correct option as selected" do |
|
0 commit comments