Bug 13937: (QA follow-up) Fix tests.

Checking result set size is enough to verify that proper results were returned. The check for non-existing record could have caused a range error depending of library versions.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Ere Maijala 2019-10-09 14:15:39 +03:00 committed by Martin Renvoize
parent ea1f698669
commit afb5796b34
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 2 additions and 6 deletions

View file

@ -20,7 +20,7 @@ our $child;
subtest 'test_search' => sub {
plan tests => 20;
plan tests => 19;
t::lib::Mocks::mock_preference('SearchEngine', 'Elasticsearch');
@ -114,8 +114,6 @@ subtest 'test_search' => sub {
ok($returned2, 'Record 2 returned as MARCXML');
is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly');
is($rs->record(2), undef, 'Record 3 does not exist');
# SRU protocol tests
my $base = 'http://localhost:42111';
my $ns = 'http://docs.oasis-open.org/ns/search-ws/sruResponse';

View file

@ -18,7 +18,7 @@ our $child;
subtest 'test_search' => sub {
plan tests => 9;
plan tests => 8;
t::lib::Mocks::mock_preference('SearchEngine', 'Zebra');
@ -114,8 +114,6 @@ subtest 'test_search' => sub {
ok ($returned2, 'Record 2 returned as MARCXML');
is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly');
is($rs->record(2), undef, 'Record 3 does not exist');
cleanup();
};