aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-04-15 18:07:32 +0100
committerEdmund von der Burg <evdb@mysociety.org>2011-04-15 18:08:04 +0100
commit7b423553479055afebbe408d05dc616ca980a29f (patch)
tree8df0d39f24f230e2c31034a1c6ec0b66e210f37a /t/app/controller
parent8cdbfa9706eb1e69f4e975646fcde99dd41a9064 (diff)
deal with trailing garbage on url
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/report_display.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t
index f979cc4ed..f0f1bdcba 100644
--- a/t/app/controller/report_display.t
+++ b/t/app/controller/report_display.t
@@ -55,6 +55,11 @@ subtest "test bad council email clients web links" => sub {
is $mech->uri->path, "/report/$report_id", "at /report/$report_id";
};
+subtest "test tailing non-ints get stripped" => sub {
+ $mech->get_ok("/report/${report_id}xx ");
+ is $mech->uri->path, "/report/$report_id", "at /report/$report_id";
+};
+
subtest "test bad ids get dealt with (404)" => sub {
foreach my $id ( 'XXX', 99999999 ) {
ok $mech->get("/report/$id"), "get '/report/$id'";