diff options
author | Hakim Cassimally <hakim@mysociety.org> | 2013-12-17 14:46:31 +0000 |
---|---|---|
committer | Hakim Cassimally <hakim@mysociety.org> | 2013-12-17 14:46:31 +0000 |
commit | c8447ee320407a0542106cf92d20d72b95452b19 (patch) | |
tree | fa620dcbbf935e2a740bf2f44ce36067da4f0298 /t/app | |
parent | cbfe33690c64f6a301e77971abb9b762318bb9be (diff) |
Test for admin_base_url in RS::Problem
Test that the slash is added in correct place (the base URL should not
have its own trailing slash).
Diffstat (limited to 't/app')
-rw-r--r-- | t/app/controller/admin.t | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index 4970821a8..e369968b4 100644 --- a/t/app/controller/admin.t +++ b/t/app/controller/admin.t @@ -1228,6 +1228,17 @@ subtest "Test setting a report from unconfirmed to something else doesn't cause $mech->get_ok("/report/$report_id"); }; +subtest "Check admin_base_url" => sub { + my $rs = FixMyStreet::App->model('DB::Problem'); + my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker($report->cobrand)->new(); + + is (FixMyStreet::App->model('DB::Problem')->get_admin_url( + $cobrand, + $report), + (sprintf 'https://secure.mysociety.org/admin/bci/report_edit/%d', $report_id), + 'get_admin_url OK'); +}; + $mech->delete_user( $user ); $mech->delete_user( $user2 ); $mech->delete_user( $user3 ); |