aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/model/problem.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-10-04 09:47:40 +0100
committerMatthew Somerville <matthew@mysociety.org>2012-10-04 09:47:40 +0100
commit4e09990cb53ebbc855b22265b0af385128d1a75b (patch)
tree95a05125a02db6d0fca70173a08915675aa4845e /t/app/model/problem.t
parent176eb62aa08884cc076cf24b1376ebb3f87fc2e5 (diff)
Move skip to start of subtest so it doesn't give a 'tests were run but no plan' warning.
Diffstat (limited to 't/app/model/problem.t')
-rw-r--r--t/app/model/problem.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/app/model/problem.t b/t/app/model/problem.t
index 8aabce4f7..9aa52c3cf 100644
--- a/t/app/model/problem.t
+++ b/t/app/model/problem.t
@@ -483,6 +483,10 @@ foreach my $test ( {
},
) {
subtest $test->{ desc } => sub {
+ if ( $test->{cobrand} && $test->{cobrand} =~ /lichfielddc/ && !FixMyStreet::Cobrand->exists('lichfielddc') ) {
+ plan skip_all => 'Skipping Lichfield tests without Lichfield cobrand';
+ }
+
$mech->clear_emails_ok;
FixMyStreet::App->model('DB::Problem')->search(
@@ -491,10 +495,6 @@ 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 },