Bugzilla – Attachment 115072 Details for
Bug 27014
SIP2 cannot find patrons at checkin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27014: (QA follow-up) Add regression tests
Bug-27014-QA-follow-up-Add-regression-tests.patch (text/plain), 2.21 KB, created by
Martin Renvoize (ashimema)
on 2021-01-12 11:21:05 UTC
(
hide
)
Description:
Bug 27014: (QA follow-up) Add regression tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-01-12 11:21:05 UTC
Size:
2.21 KB
patch
obsolete
>From 2af1ef446b7f95d7f6e0f2d195583fa8591ed6e1 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 12 Jan 2021 11:15:28 +0000 >Subject: [PATCH] Bug 27014: (QA follow-up) Add regression tests > >This patch adds a regression test for the change introduced in the >patchset. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/SIP/Patron.t | 28 +++++++++++++++++++++++++++- > 1 file changed, 27 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/SIP/Patron.t b/t/db_dependent/SIP/Patron.t >index d517c7693b..02a59d8ef2 100755 >--- a/t/db_dependent/SIP/Patron.t >+++ b/t/db_dependent/SIP/Patron.t >@@ -4,7 +4,7 @@ > # This needs to be extended! Your help is appreciated.. > > use Modern::Perl; >-use Test::More tests => 6; >+use Test::More tests => 7; > > use Koha::Database; > use Koha::Patrons; >@@ -30,6 +30,32 @@ $schema->resultset('Borrower')->search({ cardnumber => $card })->delete; > my $sip_patron2 = C4::SIP::ILS::Patron->new( $card ); > is( $sip_patron2, undef, "Patron is not valid (anymore)" ); > >+subtest "new tests" => sub { >+ >+ plan tests => 5; >+ >+ my $patron = $builder->build( >+ { >+ source => 'Borrower' >+ } >+ ); >+ >+ my $cardnumber = $patron->{cardnumber}; >+ my $userid = $patron->{userid}; >+ my $borrowernumber = $patron->{borrowernumber}; >+ >+ my $ils_patron = C4::SIP::ILS::Patron->new($cardnumber); >+ is( ref($ils_patron), 'C4::SIP::ILS::Patron', 'Found patron via cardnumber scalar' ); >+ $ils_patron = C4::SIP::ILS::Patron->new($userid); >+ is( ref($ils_patron), 'C4::SIP::ILS::Patron', 'Found patron via userid scalar' ); >+ $ils_patron = C4::SIP::ILS::Patron->new( { borrowernumber => $borrowernumber } ); >+ is( ref($ils_patron), 'C4::SIP::ILS::Patron', 'Found patron via borrowernumber hashref' ); >+ $ils_patron = C4::SIP::ILS::Patron->new( { cardnumber => $cardnumber } ); >+ is( ref($ils_patron), 'C4::SIP::ILS::Patron', 'Found patron via cardnumber hashref' ); >+ $ils_patron = C4::SIP::ILS::Patron->new( { userid => $userid } ); >+ is( ref($ils_patron), 'C4::SIP::ILS::Patron', 'Found patron via userid hashref' ); >+}; >+ > subtest "OverduesBlockCirc tests" => sub { > > plan tests => 6; >-- >2.20.1
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 27014
:
113602
|
115071
| 115072