Bugzilla – Attachment 155201 Details for
Bug 32980
Checkouts for guarantees are not shown if patron also has a guarantor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32980: Use TestBuilder
Bug-32980-Use-TestBuilder.patch (text/plain), 2.03 KB, created by
Jonathan Druart
on 2023-09-04 14:03:27 UTC
(
hide
)
Description:
Bug 32980: Use TestBuilder
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-09-04 14:03:27 UTC
Size:
2.03 KB
patch
obsolete
>From b087c41d0c24391750aa838e3c4c7d1d8e173114 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 4 Sep 2023 16:02:30 +0200 >Subject: [PATCH] Bug 32980: Use TestBuilder > >Also +x >--- > t/db_dependent/Koha/Patron/siblings.t | 25 ++++++++----------------- > 1 file changed, 8 insertions(+), 17 deletions(-) > >diff --git a/t/db_dependent/Koha/Patron/siblings.t b/t/db_dependent/Koha/Patron/siblings.t >index 1b7b7cc9749..0441ca52ab2 100755 >--- a/t/db_dependent/Koha/Patron/siblings.t >+++ b/t/db_dependent/Koha/Patron/siblings.t >@@ -2,9 +2,10 @@ > > use Modern::Perl; > >-use String::Random; > use Test::More tests => 1; > >+use t::lib::TestBuilder; >+ > use Koha::Database; > use Koha::Patrons; > >@@ -14,25 +15,15 @@ subtest 'Koha::Patrons::siblings should return a Koha::Patrons object even if pa > plan tests => 2; > $schema->txn_begin; > >- my $random = String::Random->new; >- >- my $categorycode = $random->randpattern('CCCCCCCCCC'); >- my $branchcode = $random->randpattern('CCCCCCCCCC'); >- >- my $category = $schema->resultset('Category')->create( { categorycode => $categorycode } ); >- my $branch = $schema->resultset('Branch')->create( >- { >- branchcode => $branchcode, >- branchname => 'Test branch for Koha::Patron::siblings tests', >- } >- ); >- my $borrower = $schema->resultset('Borrower')->create( >+ my $builder = t::lib::TestBuilder->new; >+ my $category = $builder->build_object( { class => 'Koha::Patron::Categories' } ); >+ my $library = $builder->build_object( { class => 'Koha::Libraries' } ); >+ my $patron = $builder->build_object( > { >- categorycode => $categorycode, >- branchcode => $branchcode, >+ class => 'Koha::Patrons', >+ value => { categorycode => $category->categorycode, branchcode => $library->branchcode } > } > ); >- my $patron = Koha::Patrons->find( $borrower->borrowernumber ); > > my $siblings = $patron->siblings; > isa_ok( $siblings, 'Koha::Patrons' ); >-- >2.25.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 32980
:
146731
|
155004
|
155014
|
155015
|
155016
|
155061
|
155062
|
155063
| 155201