diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-11-04 17:59:50 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-11-04 17:59:50 +0000 |
commit | 08b33bdbd4a0dc29941cb5d714f1ea70f0142fde (patch) | |
tree | 140c620a4d54e5b27cdaed2c263d10206b448621 /t/app | |
parent | 462ac4e63de91f07254637d2206ada7055efb4d4 (diff) | |
parent | 431473eda8fb672d7a42d8ffce1dcee32b5f4d56 (diff) |
Merge branch '389-report-search-ref' of https://github.com/andylolz/fixmystreet into andylolz-389-report-search-ref
Diffstat (limited to 't/app')
-rw-r--r-- | t/app/controller/admin.t | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t index 85f4572fc..a48e2e919 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', @@ -1041,6 +1042,12 @@ 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=' . $report->external_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; |