From ed15f04422add5f8f9942c53e96debb0bdc6844a Mon Sep 17 00:00:00 2001 From: Andy Lulham Date: Sat, 26 Oct 2013 01:48:46 +0100 Subject: Add a test for the external_id admin report search --- t/app/controller/admin.t | 4 ++++ 1 file changed, 4 insertions(+) (limited to 't/app/controller/admin.t') 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} ); + $mech->get_ok('/admin/reports?search=ref:' . $report->external_id); + $mech->content_like( qr{href="http://[^/]*[^.]/report/$r_id">$r_id} ); + $mech->get_ok('/admin/reports?search=' . $report->user->email); my $u_id = $update->id; -- cgit v1.2.3