aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/around.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-12-13 17:55:59 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-12-13 17:55:59 +0000
commit188221d35b59624ce686c97f650b114feb586709 (patch)
tree041facaa54a8d117c0d82a8a68d176ce11799945 /t/app/controller/around.t
parent5a6d30ba74e70412593398b43e4c5e5c938c1d4c (diff)
parent5b49ba7aa2ba707bd7d157db6ef0bcfc6c00cf78 (diff)
Merge branch 'yodenuncio'
Diffstat (limited to 't/app/controller/around.t')
-rw-r--r--t/app/controller/around.t16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/app/controller/around.t b/t/app/controller/around.t
index 8b4fc7825..d1254edb7 100644
--- a/t/app/controller/around.t
+++ b/t/app/controller/around.t
@@ -1,3 +1,5 @@
+use Test::MockModule;
+
use FixMyStreet::TestMech;
my $mech = FixMyStreet::TestMech->new;
@@ -174,4 +176,18 @@ subtest 'check category and status filtering works on /around?ajax' => sub {
is scalar @$pins, 1, 'correct number of fixed Vegetation reports';
};
+subtest 'check skip_around skips around page' => sub {
+ my $cobrand = Test::MockModule->new('FixMyStreet::Cobrand::Default');
+ $cobrand->mock('skip_around_page', sub { 1 });
+ $cobrand->mock('country', sub { 1 });
+
+ FixMyStreet::override_config {
+ MAPIT_URL => 'http://mapit.uk/',
+ }, sub {
+ $mech->get('/around?latitude=51.754926&longitude=-1.256179');
+ is $mech->res->code, 302, "around page is a redirect";
+ is $mech->uri->path, '/report/new', "and redirects to /report/new";
+ };
+};
+
done_testing();