From ef0cd4f9a76e6307fb013a0270d95ae57f35f082 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 3 Sep 2020 09:56:00 +0000 Subject: [PATCH] Bug 26364: Check that return value isn't the value we don't want. Don't check for undef It seems sometimes we get an ISBN returned that matches a book in the sample data. One of the Harry Potter books was matching the ISBN. Our real concern is not that we get nothing, but that we don't get the same value we pass in. We should test for that To test: 1 - prove -v t/db_dependent/XISBN.t 2 - The failures are not consistent, so read the code and ensure we are making sense --- t/db_dependent/XISBN.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/XISBN.t b/t/db_dependent/XISBN.t index 4cc939d28a..4579ef0e12 100755 --- a/t/db_dependent/XISBN.t +++ b/t/db_dependent/XISBN.t @@ -76,8 +76,8 @@ eval { $results_thingisbn = C4::XISBN::get_xisbns($isbn1,$biblionumber3); }; SKIP: { skip "Problem retrieving ThingISBN", 1 unless $@ eq ''; - is( $results_thingisbn->[0]->{biblionumber}, - undef, + isnt( $results_thingisbn->[0]->{biblionumber}, + $biblionumber3, "Doesn't get biblionumber if the biblionumber matches the one passed to the sub." ); } -- 2.11.0