Bugzilla – Attachment 109599 Details for
Bug 26364
XISBN.t makes a bad assumption about return values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26364: Check that return value isn't the value we don't want. Don't check for undef
Bug-26364-Check-that-return-value-isnt-the-value-w.patch (text/plain), 1.28 KB, created by
Nick Clemens (kidclamp)
on 2020-09-03 09:59:27 UTC
(
hide
)
Description:
Bug 26364: Check that return value isn't the value we don't want. Don't check for undef
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-09-03 09:59:27 UTC
Size:
1.28 KB
patch
obsolete
>From ef0cd4f9a76e6307fb013a0270d95ae57f35f082 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26364
:
109599
|
109631
|
109821
|
109822
|
109823
|
109824
|
109825
|
113054
|
113055
|
113056
|
113057
|
113058
|
114818
|
114819
|
114820
|
114821
|
114822