aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-08-06 10:54:04 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-08-06 10:54:04 +0100
commitc1c43ae6714b35b85aa520b4422236f484936986 (patch)
tree6a2b47c9a95a69699b21a2c07a456f2a24bba407 /t/app
parent6324af77e91613e8bfe13ebde2da5f00d045cfab (diff)
Fix problem.t test so it skips Lichfield tests if Lichfield cobrand is not present.
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/report_new.t3
-rw-r--r--t/app/model/problem.t4
2 files changed, 5 insertions, 2 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index 72256f645..88236a1c3 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -875,8 +875,7 @@ for my $test (
{
subtest $test->{desc} => sub {
if ( $test->{host} =~ /bromley/ && !FixMyStreet::Cobrand->exists('bromley') ) {
- ok 1, 'Skipping Bromley tests without Bromley cobrand';
- return;
+ plan skip_all => 'Skipping Bromley tests without Bromley cobrand';
}
$mech->host( $test->{host} );
diff --git a/t/app/model/problem.t b/t/app/model/problem.t
index 8c3ea10c5..8aabce4f7 100644
--- a/t/app/model/problem.t
+++ b/t/app/model/problem.t
@@ -491,6 +491,10 @@ foreach my $test ( {
}
)->update( { whensent => \'ms_current_timestamp()' } );
+ if ( $test->{cobrand} && $test->{cobrand} =~ /lichfielddc/ && !FixMyStreet::Cobrand->exists('lichfielddc') ) {
+ plan skip_all => 'Skipping Lichfield tests without Lichfield cobrand';
+ }
+
$problem->discard_changes;
$problem->update( {
council => $test->{ council },