Bugzilla – Attachment 131012 Details for
Bug 22321
Make it possible to edit illrequests.borrowernumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22321: Unit test for new()->borrowernumber()->store()
Bug-22321-Unit-test-for-new-borrowernumber-store.patch (text/plain), 1.54 KB, created by
Lari Taskula
on 2022-02-22 14:10:37 UTC
(
hide
)
Description:
Bug 22321: Unit test for new()->borrowernumber()->store()
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2022-02-22 14:10:37 UTC
Size:
1.54 KB
patch
obsolete
>From b70058f2a6657b7efa5a2e53cf338998d3f79594 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Tue, 22 Feb 2022 14:08:34 +0000 >Subject: [PATCH] Bug 22321: Unit test for new()->borrowernumber()->store() > >--- > t/db_dependent/Illrequests.t | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Illrequests.t b/t/db_dependent/Illrequests.t >index 2ee61123c5..0ae7883489 100755 >--- a/t/db_dependent/Illrequests.t >+++ b/t/db_dependent/Illrequests.t >@@ -126,7 +126,7 @@ subtest 'Basic object tests' => sub { > }; > > subtest 'store borrowernumber change also updates holds' => sub { >- plan tests => 3; >+ plan tests => 5; > > $schema->storage->txn_begin; > >@@ -170,6 +170,21 @@ subtest 'store borrowernumber change also updates holds' => sub { > is( $request->borrowernumber, $other_patron->borrowernumber, > 'after change, changed borrowernumber found in illrequests' ); > >+ my $new_request = Koha::Illrequest->new({ >+ biblio_id => $biblio->biblionumber, >+ branchcode => $patron->branchcode, >+ })->borrowernumber( $patron->borrowernumber )->store; >+ >+ is( $new_request->borrowernumber, $patron->borrowernumber, >+ 'Koha::Illrequest->new()->store() works as expected'); >+ >+ my $new_holds_found = Koha::Holds->search({ >+ biblionumber => $new_request->biblio_id, >+ borrowernumber => $new_request->borrowernumber, >+ })->count; >+ >+ is( $new_holds_found, 0, 'no holds found with new()->store()' ); >+ > $schema->storage->txn_rollback; > > }; >-- >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 22321
:
130544
|
130545
|
130546
|
131012
|
131013
|
131055
|
131056
|
131057
|
131058
|
131059
|
138873
|
138874
|
138875
|
138876
|
138877
|
138878
|
141342
|
141343
|
141344
|
141345
|
141346
|
141347