aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2015-10-26 16:05:24 +0000
committerMatthew Somerville <matthew@mysociety.org>2015-10-29 17:59:45 +0000
commit2a6e538e9486f35af7eb1f287e3ec858ab83f8cd (patch)
tree0369a6fb0fa06bcb206735a4d3881a16e8540b28 /t
parent783eb401e5074c908d2d80862efff4f81c73eb74 (diff)
Add generic static route handler.
This puts all static pages under /about, and lets you add new static pages by placing new HTML in your about template directory.
Diffstat (limited to 't')
-rw-r--r--t/app/controller/about.t9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/app/controller/about.t b/t/app/controller/about.t
index fb0744d6a..750983f24 100644
--- a/t/app/controller/about.t
+++ b/t/app/controller/about.t
@@ -11,6 +11,15 @@ $mech->get_ok('/about');
$mech->content_like(qr{About us ::\s+FixMyStreet});
$mech->content_contains('html class="no-js" lang="en-gb"');
+$mech->get_ok('/privacy');
+is $mech->res->code, 200, "got 200 for final destination";
+is $mech->res->previous->code, 302, "got 302 for redirect";
+is $mech->uri->path, '/about/privacy';
+
+$mech->get('/about/page-that-does-not-exist');
+ok !$mech->res->is_success(), "want a bad response";
+is $mech->res->code, 404, "got 404";
+
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'emptyhomes' ],
}, sub {