Bugzilla – Attachment 131058 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.59 KB, created by
Magnus Enger
on 2022-02-24 08:58:12 UTC
(
hide
)
Description:
Bug 22321: Unit test for new()->borrowernumber()->store()
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2022-02-24 08:58:12 UTC
Size:
1.59 KB
patch
obsolete
>From 86f0800ede0c73217837d32ab35e4018501eab92 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() > >Signed-off-by: Magnus Enger <magnus@libriotech.no> >--- > 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 a8260b5633..0b0d19a22a 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.11.0
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