Bugzilla – Attachment 154995 Details for
Bug 34609
Holds history errors 500 if old_reserves.biblionumber is NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34609: Add missing test for Koha::Hold->biblio
Bug-34609-Add-missing-test-for-KohaHold-biblio.patch (text/plain), 1.36 KB, created by
Jonathan Druart
on 2023-08-31 07:10:13 UTC
(
hide
)
Description:
Bug 34609: Add missing test for Koha::Hold->biblio
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-08-31 07:10:13 UTC
Size:
1.36 KB
patch
obsolete
>From 849a16dfcce1508ce89e20e5332c4808b2f7691f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 31 Aug 2023 09:03:31 +0200 >Subject: [PATCH] Bug 34609: Add missing test for Koha::Hold->biblio > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Koha/Hold.t | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Hold.t b/t/db_dependent/Koha/Hold.t >index 5fc1646d35a..cc90dafb899 100755 >--- a/t/db_dependent/Koha/Hold.t >+++ b/t/db_dependent/Koha/Hold.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 11; >+use Test::More tests => 12; > > use Test::Exception; > use Test::MockModule; >@@ -67,6 +67,26 @@ subtest 'store() tests' => sub { > $schema->storage->txn_rollback; > }; > >+subtest 'biblio() tests' => sub { >+ >+ plan tests => 1; >+ >+ $schema->storage->txn_begin; >+ >+ my $hold = $builder->build_object( >+ { >+ class => 'Koha::Holds', >+ } >+ ); >+ >+ local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /cannot be null/ }; >+ throws_ok { $hold->biblionumber(undef)->store; } >+ 'DBIx::Class::Exception', >+ 'reserves.biblionumber cannot be null, exception thrown'; >+ >+ $schema->storage->txn_rollback; >+}; >+ > subtest 'fill() tests' => sub { > > plan tests => 14; >-- >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 34609
:
154738
|
154901
|
154952
|
154953
|
154954
|
154993
|
154994
| 154995