diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-10-23 22:38:20 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-10-24 21:34:46 +0100 |
commit | cd51c26830d4f6ba144874e2f26010f7b6b76636 (patch) | |
tree | 17a0316b6c461e2ba45ac1d462772bf37fddc38e /t/app/controller/questionnaire.t | |
parent | 0b28f2ac1af652c37eda35f944b5eb78f4adf5d1 (diff) |
Fix test suite to run regardless of config setup.
Diffstat (limited to 't/app/controller/questionnaire.t')
-rw-r--r-- | t/app/controller/questionnaire.t | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/t/app/controller/questionnaire.t b/t/app/controller/questionnaire.t index 5c81a43d1..8e553a1a5 100644 --- a/t/app/controller/questionnaire.t +++ b/t/app/controller/questionnaire.t @@ -383,10 +383,9 @@ for my $test ( }; } -SKIP: { - skip( "Need 'emptyhomes' in ALLOWED_COBRANDS config", 18 ) - unless FixMyStreet::Cobrand->exists('emptyhomes'); - +FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'emptyhomes' ], +}, sub { # EHA extra checking ok $mech->host("reportemptyhomes.com"), 'change host to reportemptyhomes'; @@ -436,12 +435,11 @@ SKIP: { ok $questionnaire, 'found questionnaire'; $questionnaire2->delete; -} - -SKIP: { - skip( "Need 'fiksgatami' in ALLOWED_COBRANDS config", 5 ) - unless FixMyStreet::Cobrand->exists('fiksgatami'); +}; +FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'fiksgatami' ], +}, sub { # I18N Unicode extra testing using FiksGataMi $report->send_questionnaire( 1 ); $report->cobrand( 'fiksgatami' ); @@ -455,7 +453,7 @@ SKIP: { like $email->body, qr/Testing =96 Detail/, 'email contains encoded character from user'; like $email->body, qr/sak p=E5 FiksGataMi/, 'email contains encoded character from template'; is $email->header('Content-Type'), 'text/plain; charset="windows-1252"', 'email is in right encoding'; -} +}; $mech->delete_user('test@example.com'); done_testing(); |