aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
authorAndy Lulham <a.lulham@gmail.com>2013-10-26 01:48:46 +0100
committerAndy Lulham <a.lulham@gmail.com>2013-10-26 01:48:46 +0100
commited15f04422add5f8f9942c53e96debb0bdc6844a (patch)
tree539ff7e1982fac7c83dfd97a1d1654d57dcbdd59 /t/app
parent5abcd71493e69c38c9a349d9631f840488771ae1 (diff)
Add a test for the external_id admin report search
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/admin.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index 521497f3e..12f1f7ff5 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -53,6 +53,7 @@ my $report = FixMyStreet::App->model('DB::Problem')->find_or_create(
used_map => 't',
name => 'Test User',
anonymous => 'f',
+ external_id => '13',
state => 'confirmed',
confirmed => $dt->ymd . ' ' . $dt->hms,
lang => 'en-gb',
@@ -1034,6 +1035,9 @@ subtest 'report search' => sub {
my $r_id = $report->id;
$mech->content_like( qr{href="http://[^/]*[^.]/report/$r_id">$r_id</a>} );
+ $mech->get_ok('/admin/reports?search=ref:' . $report->external_id);
+ $mech->content_like( qr{href="http://[^/]*[^.]/report/$r_id">$r_id</a>} );
+
$mech->get_ok('/admin/reports?search=' . $report->user->email);
my $u_id = $update->id;