aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-09-19 11:37:39 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-10-04 11:26:25 +0100
commitd19fef1920c64d1d2871d30dbc573fafa9e430e1 (patch)
treea3e9d45f16c5ddbfc1fe519057ec71dddf8d0171 /t
parente4d3a706de4600df182d18917165abf83971800f (diff)
[Northants] Blue pins and no ID for body reports.
Diffstat (limited to 't')
-rw-r--r--t/cobrand/northamptonshire.t19
1 files changed, 18 insertions, 1 deletions
diff --git a/t/cobrand/northamptonshire.t b/t/cobrand/northamptonshire.t
index 78f5e83e1..70df10340 100644
--- a/t/cobrand/northamptonshire.t
+++ b/t/cobrand/northamptonshire.t
@@ -96,8 +96,9 @@ subtest 'check updates sent for non defects' => sub {
is $comment->send_fail_count, 1, "comment sending attempted";
};
+my $cobrand = FixMyStreet::Cobrand::Northamptonshire->new;
+
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;
@@ -105,4 +106,20 @@ subtest 'check updates disallowed correctly' => sub {
is $cobrand->updates_disallowed($report), 1;
};
+subtest 'check pin colour / reference shown' => sub {
+ FixMyStreet::override_config {
+ ALLOWED_COBRANDS => 'northamptonshire',
+ #MAPIT_URL => 'http://mapit.uk/',
+ }, sub {
+ is $cobrand->pin_colour($report, 'around'), 'blue';
+ $mech->get_ok('/report/' . $report->id);
+ $mech->content_lacks('ref:&nbsp;' . $report->id);
+ $report->update({ user => $user });
+ is $cobrand->pin_colour($report, 'around'), 'yellow';
+ is $cobrand->pin_colour($report, 'my'), 'red';
+ $mech->get_ok('/report/' . $report->id);
+ $mech->content_contains('ref:&nbsp;' . $report->id);
+ };
+};
+
done_testing();