aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
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: ' . $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: ' . $report->id);
+ };
+};
+
done_testing();