View | Details | Raw Unified | Return to bug 11430
Collapse All | Expand All

(-)a/t/db_dependent/Search/History.t (-3 / +6 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Test::More tests => 18;
5
use Test::More tests => 19;
6
use Test::Warn;
6
use URI::Escape;
7
use URI::Escape;
7
use List::Util qw( shuffle );
8
use List::Util qw( shuffle );
8
9
Lines 123-129 is( scalar(@$all), 0, 'There are 0 search after deleting all searches for a user Link Here
123
delete_all( $userid );
124
delete_all( $userid );
124
125
125
add( $userid, $current_sessionid, $previous_sessionid, $total, $query_cgi_b, $query_cgi_a );
126
add( $userid, $current_sessionid, $previous_sessionid, $total, $query_cgi_b, $query_cgi_a );
126
C4::Search::History::delete({});
127
warning_like { C4::Search::History::delete({}) }
128
          qr/^ERROR: userid or id is required for history deletion/,
129
          'Calling delete without userid raises warning'
130
        ;
127
$all = C4::Search::History::get({userid => $userid});
131
$all = C4::Search::History::get({userid => $userid});
128
is( scalar(@$all), 9, 'There are still 9 searches after calling delete without userid' );
132
is( scalar(@$all), 9, 'There are still 9 searches after calling delete without userid' );
129
delete_all( $userid );
133
delete_all( $userid );
130
- 

Return to bug 11430