3 use Test::More tests => 11;
7 use_ok( 'OpenILS::WWW::EGCatLoader' );
9 use_ok( 'OpenILS::WWW::EGCatLoader::Account' );
10 use_ok( 'OpenILS::WWW::EGCatLoader::Container' );
11 use_ok( 'OpenILS::WWW::EGCatLoader::Record' );
12 use_ok( 'OpenILS::WWW::EGCatLoader::Search' );
13 use_ok( 'OpenILS::WWW::EGCatLoader::Util' );
17 $cgi->param('query', 'sort(titlesort) cats site(CONS)');
18 $cgi->param('sort', '');
19 $cgi->param('depth', 0);
20 my ($user_query, $query, $site, $depth) = OpenILS::WWW::EGCatLoader::_prepare_biblio_search($cgi, $ctx);
21 is($user_query, 'sort(titlesort) cats site(CONS)', 'LP#100504: user query left as is');
22 is($site, 'CONS', 'successfully parsed site');
23 is($depth, '0', 'successfully parsed depth');
24 is($query, 'cats site(CONS) depth(0)', 'LP#1562153: change sort order to relevance');
27 $cgi->param('pubdate', 'is');
28 $cgi->param('date1', '1999');
29 ($user_query, $query, $site, $depth) = OpenILS::WWW::EGCatLoader::_prepare_biblio_search($cgi, $ctx);
30 is($query, 'date1(1999) cats site(CONS) depth(0)', 'LP#1005040: "is" pubdate filter mapped to date1() filter');