aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/cobrand/northamptonshire.t11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/cobrand/northamptonshire.t b/t/cobrand/northamptonshire.t
index 09023f4c0..78f5e83e1 100644
--- a/t/cobrand/northamptonshire.t
+++ b/t/cobrand/northamptonshire.t
@@ -3,6 +3,8 @@ use Test::MockModule;
use FixMyStreet::TestMech;
use Open311::PostServiceRequestUpdates;
+use_ok 'FixMyStreet::Cobrand::Northamptonshire';
+
my $mech = FixMyStreet::TestMech->new;
use open ':std', ':encoding(UTF-8)';
@@ -94,4 +96,13 @@ subtest 'check updates sent for non defects' => sub {
is $comment->send_fail_count, 1, "comment sending attempted";
};
+subtest 'check updates disallowed correctly' => sub {
+ my $cobrand = FixMyStreet::Cobrand::Northamptonshire->new;
+ is $cobrand->updates_disallowed($report), 0;
+ $report->update({ state => 'closed' });
+ is $cobrand->updates_disallowed($report), 1;
+ $report->update({ state => 'confirmed', user => $counciluser });
+ is $cobrand->updates_disallowed($report), 1;
+};
+
done_testing();