diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-01-31 16:16:20 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-02-04 14:27:32 +0000 |
commit | 4fe75bb172973c559ea4d4421b38a9f12c1a39e0 (patch) | |
tree | 77c317e64ad94bf3d24079bfe0f9a7a8c718534a /t | |
parent | d31d0c528f422ca62863516c26cd0ba6d3cc1f98 (diff) |
[UK] Use feature flag for send_questionnaire.
Diffstat (limited to 't')
-rw-r--r-- | t/cobrand/tfl.t | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/cobrand/tfl.t b/t/cobrand/tfl.t index 24185993b..e61c6d1bd 100644 --- a/t/cobrand/tfl.t +++ b/t/cobrand/tfl.t @@ -1,6 +1,7 @@ use FixMyStreet::TestMech; use FixMyStreet::App; use FixMyStreet::Script::Reports; +use FixMyStreet::Script::Questionnaires; # disable info logs for this test run FixMyStreet::App->log->disable('info'); @@ -208,6 +209,11 @@ FixMyStreet::override_config { do_not_reply_email => { tfl => 'fms-tfl-DO-NOT-REPLY@example.com', }, + send_questionnaire => { + fixmystreet => { + TfL => 0, + } + }, }, }, sub { @@ -692,6 +698,12 @@ subtest 'Test public reports are visible on cobrands appropriately' => sub { $mech->content_contains('Other problem'); }; +subtest 'Test no questionnaire sending' => sub { + $report->update({ send_questionnaire => 1, whensent => \"current_timestamp-'7 weeks'::interval" }); + FixMyStreet::Script::Questionnaires::send(); + $mech->email_count_is(0); +}; + }; FixMyStreet::override_config { |