aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-09-19 11:38:04 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-09-20 09:41:45 +0100
commit11bbbf3de54071d600d159f78a596ce01ce9a418 (patch)
tree27eabca2934a6c5381534f623785af2b1085bab0 /t/cobrand
parent9d12ecc52d5a3413b12d3781349e228026e79f5e (diff)
[Northamptonshire] No updates on some reports.
Fixed, closed, or reports by the body user.
Diffstat (limited to 't/cobrand')
-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();