|
189 | 189 | end |
190 | 190 | end |
191 | 191 |
|
192 | | - context "when send_daily_submission_batch is true" do |
193 | | - let(:send_daily_submission_batch) { true } |
| 192 | + context "when the daily_submission_emails_enabled feature is enabled", :feature_daily_submission_emails_enabled do |
| 193 | + context "when send_daily_submission_batch is true" do |
| 194 | + let(:send_daily_submission_batch) { true } |
194 | 195 |
|
195 | | - it "tells the user they getting a daily CSV" do |
196 | | - expect(rendered).to have_css("h4", text: I18n.t("forms.made_live_form.how_you_get_completed_forms.daily_csv.title")) |
197 | | - expect(rendered).to include(I18n.t("forms.made_live_form.how_you_get_completed_forms.daily_csv.enabled")) |
| 196 | + it "tells the user they getting a daily CSV" do |
| 197 | + expect(rendered).to have_css("h4", text: I18n.t("forms.made_live_form.how_you_get_completed_forms.daily_csv.title")) |
| 198 | + expect(rendered).to include(I18n.t("forms.made_live_form.how_you_get_completed_forms.daily_csv.enabled")) |
| 199 | + end |
198 | 200 | end |
199 | | - end |
200 | 201 |
|
201 | | - context "when send_daily_submission_batch is false" do |
202 | | - let(:send_daily_submission_batch) { false } |
| 202 | + context "when send_daily_submission_batch is false" do |
| 203 | + let(:send_daily_submission_batch) { false } |
| 204 | + |
| 205 | + it "tells the user they have not opted to get a daily CSV" do |
| 206 | + expect(rendered).to have_css("h4", text: I18n.t("forms.made_live_form.how_you_get_completed_forms.daily_csv.title")) |
| 207 | + expect(rendered).to include(I18n.t("forms.made_live_form.how_you_get_completed_forms.daily_csv.disabled")) |
| 208 | + end |
| 209 | + end |
| 210 | + end |
203 | 211 |
|
204 | | - it "tells the user they have not opted to get a daily CSV" do |
205 | | - expect(rendered).to have_css("h4", text: I18n.t("forms.made_live_form.how_you_get_completed_forms.daily_csv.title")) |
206 | | - expect(rendered).to include(I18n.t("forms.made_live_form.how_you_get_completed_forms.daily_csv.disabled")) |
| 212 | + context "when the daily_submission_emails_enabled feature is disabled", feature_daily_submission_emails_enabled: false do |
| 213 | + it "does not include the daily CSV section" do |
| 214 | + expect(rendered).not_to have_css("h4", text: I18n.t("forms.made_live_form.how_you_get_completed_forms.daily_csv.title")) |
207 | 215 | end |
208 | 216 | end |
209 | 217 |
|
|
0 commit comments