Bugzilla – Attachment 95542 Details for
Bug 24062
Circulation tests fail randomly if patron category type is 'X'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24062: Fix the failing test
Bug-24062-Fix-the-failing-test.patch (text/plain), 2.38 KB, created by
Martin Renvoize (ashimema)
on 2019-11-19 11:17:49 UTC
(
hide
)
Description:
Bug 24062: Fix the failing test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-11-19 11:17:49 UTC
Size:
2.38 KB
patch
obsolete
>From 7e9cf2194386a71f243c88d6e951411bdfb05db6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 19 Nov 2019 09:44:12 +0100 >Subject: [PATCH] Bug 24062: Fix the failing test > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Circulation.t | 29 +++++++++-------------------- > 1 file changed, 9 insertions(+), 20 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 471983bdb5..aff4ee918e 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1955,42 +1955,31 @@ subtest 'AddReturn + suspension_chargeperiod' => sub { > subtest 'CanBookBeIssued + AutoReturnCheckedOutItems' => sub { > plan tests => 2; > >- my $library = $builder->build( { source => 'Branch' } ); >- my $patron_category_x = $builder->build_object( >- { >- class => 'Koha::Patron::Categories', >- value => { category_type => 'X' } >- } >- ); >- >+ my $library = $builder->build_object( { class => 'Koha::Libraries' } ); > my $patron1 = $builder->build_object( > { > class => 'Koha::Patrons', >- value => { >- branchcode => $library->{branchcode}, >- firstname => "Happy", >- surname => "Gilmore", >+ value => { >+ library => $library->branchcode, >+ categorycode => $patron_category->{categorycode} > } > } > ); > my $patron2 = $builder->build_object( > { > class => 'Koha::Patrons', >- value => { >- branchcode => $library->{branchcode}, >- categorycode => $patron_category_x->categorycode, >- firstname => "Billy", >- surname => "Madison", >+ value => { >+ library => $library->branchcode, >+ categorycode => $patron_category->{categorycode} > } > } > ); > >- C4::Context->_new_userenv('xxx'); >- C4::Context->set_userenv(0,0,0,'firstname','surname', $library->{branchcode}, 'Random Library', '', '', ''); >+ t::lib::Mocks::mock_userenv({ branchcode => $library->branchcode }); > > my $item = $builder->build_sample_item( > { >- library => $library->{branchcode}, >+ library => $library->branchcode, > } > )->unblessed; > >-- >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 24062
:
95524
|
95525
|
95526
|
95541
|
95542
|
95543
|
95549
|
95550