Bugzilla – Attachment 59052 Details for
Bug 17917
t/db_dependent/check_sysprefs.t fails on kohadev strangely
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17917: Fix Jenkins for t/db_dependent/Reserves.t
Bug-17917-Fix-Jenkins-for-tdbdependentReservest.patch (text/plain), 3.22 KB, created by
Mark Tompsett
on 2017-01-17 03:23:55 UTC
(
hide
)
Description:
Bug 17917: Fix Jenkins for t/db_dependent/Reserves.t
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-01-17 03:23:55 UTC
Size:
3.22 KB
patch
obsolete
>From 10eda8f6c60cf9f5540d9c533cf337d25d1df434 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Mon, 16 Jan 2017 21:54:29 -0500 >Subject: [PATCH] Bug 17917: Fix Jenkins for t/db_dependent/Reserves.t > >TEST PLAN >--------- >1) prove -v t/db_dependent/Reserves.t > -- fails >2) apply this patch >3) prove -v t/db_dependent/Reserves.t > -- succeeds >4) run koha qa test tools >--- > t/db_dependent/Reserves.t | 61 +++++++++++++++++++++++++++++++---------------- > 1 file changed, 41 insertions(+), 20 deletions(-) > >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index 37d90d9..c4d0f16 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -106,9 +106,14 @@ my %data = ( > surname => 'my surname', > categorycode => $category_1, > branchcode => $branch_1, >+ dateofbirth => undef, > ); > Koha::Patron::Categories->find($category_1)->set({ enrolmentfee => 0})->store; >-my $borrowernumber = AddMember(%data); >+my $patron = $builder->build({ >+ source => 'Borrower', >+ value => \%data, >+}); >+my $borrowernumber = $patron->{borrowernumber}; > my $borrower = GetMember( borrowernumber => $borrowernumber ); > my $biblionumber = $bibnum; > my $barcode = $testbarcode; >@@ -160,28 +165,44 @@ t::lib::Mocks::mock_preference( 'ReservesControlBranch', $ReservesControlBranch > ### Regression test for bug 10272 > ### > my %requesters = (); >-$requesters{$branch_1} = AddMember( >- branchcode => $branch_1, >- categorycode => $category_2, >- surname => "borrower from $branch_1", >-); >-for my $i ( 2 .. 5 ) { >- $requesters{"CPL$i"} = AddMember( >+my $patron_branch1 = $builder->build({ >+ source => 'Borrower', >+ value => { > branchcode => $branch_1, > categorycode => $category_2, >- surname => "borrower $i from $branch_1", >- ); >+ surname => "borrower from $branch_1", >+ }, >+}); >+$requesters{$branch_1} = $patron_branch1->{borrowernumber}; >+for my $i ( 2 .. 5 ) { >+ my $patron_cpl = $builder->build({ >+ source => 'Borrower', >+ value => { >+ branchcode => $branch_1, >+ categorycode => $category_2, >+ surname => "borrower $i from $branch_1", >+ }, >+ }); >+ $requesters{"CPL$i"} = $patron_cpl; > } >-$requesters{$branch_2} = AddMember( >- branchcode => $branch_2, >- categorycode => $category_2, >- surname => "borrower from $branch_2", >-); >-$requesters{$branch_3} = AddMember( >- branchcode => $branch_3, >- categorycode => $category_2, >- surname => "borrower from $branch_3", >-); >+my $patron_branch2 = $builder->build({ >+ source => 'Borrower', >+ value => { >+ branchcode => $branch_2, >+ categorycode => $category_2, >+ surname => "borrower from $branch_2", >+ } >+}); >+$requesters{$branch_2} = $patron_branch2->{borrowernumber}; >+my $patron_branch3 = $builder->build({ >+ source => 'Borrower', >+ value => { >+ branchcode => $branch_3, >+ categorycode => $category_2, >+ surname => "borrower from $branch_3", >+ }, >+}); >+$requesters{$branch_3} = $patron_branch3->{borrowernumber}; > > # Configure rules so that $branch_1 allows only $branch_1 patrons > # to request its items, while $branch_2 will allow its items >-- >2.1.4
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 17917
:
59026
|
59027
|
59028
|
59029
|
59030
|
59031
|
59039
|
59040
|
59041
|
59042
|
59044
|
59045
|
59046
|
59052
|
59062
|
59175
|
59206
|
59207
|
59274
|
59287
|
59299
|
59310
|
59311
|
59313
|
59319
|
59320
|
59321