Bugzilla – Attachment 58463 Details for
Bug 17742
Test t/db_dependent/Patrons.t can fail randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17742: Use TestBuilder to create the library and patron category
Bug-17742-Use-TestBuilder-to-create-the-library-an.patch (text/plain), 1.40 KB, created by
Jonathan Druart
on 2016-12-28 08:58:17 UTC
(
hide
)
Description:
Bug 17742: Use TestBuilder to create the library and patron category
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-12-28 08:58:17 UTC
Size:
1.40 KB
patch
obsolete
>From 7e22d0aaca027d63a6f466c3031787c8c3a4beef Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 28 Dec 2016 09:57:14 +0100 >Subject: [PATCH] Bug 17742: Use TestBuilder to create the library and patron > category > >Moreover we do not need to remove the existing issues and patrons > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > t/db_dependent/Patrons.t | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Patrons.t b/t/db_dependent/Patrons.t >index b0b6b60..40f770d 100755 >--- a/t/db_dependent/Patrons.t >+++ b/t/db_dependent/Patrons.t >@@ -24,6 +24,8 @@ use C4::Context; > use Koha::Database; > use Koha::DateUtils; > >+use t::lib::TestBuilder; >+ > BEGIN { > use_ok('Koha::Objects'); > use_ok('Koha::Patrons'); >@@ -33,12 +35,10 @@ BEGIN { > my $database = Koha::Database->new(); > my $schema = $database->schema(); > $schema->storage->txn_begin(); >+my $builder = t::lib::TestBuilder->new; > >-$schema->resultset('Issue')->delete_all(); >-$schema->resultset('Borrower')->delete_all(); >- >-my $categorycode = $schema->resultset('Category')->first()->categorycode(); >-my $branchcode = $schema->resultset('Branch')->first()->branchcode(); >+my $categorycode = $builder->build({ source => 'Category' })->{categorycode}; >+my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; > > my $b1 = Koha::Patron->new( > { >-- >2.9.3
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 17742
:
58033
|
58085
|
58148
|
58150
|
58460
|
58462
| 58463