Bugzilla – Attachment 129484 Details for
Bug 21652
reserves.waitingdate is set to current date by printing new hold slip
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21652: Unit test
Bug-21652-Unit-test.patch (text/plain), 1.23 KB, created by
Nick Clemens
on 2022-01-14 14:20:22 UTC
(
hide
)
Description:
Bug 21652: Unit test
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2022-01-14 14:20:22 UTC
Size:
1.23 KB
patch
obsolete
>From 574d0d5ad770e5ed857dd54b8f702c83b8d82637 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 14 Jan 2022 14:17:02 +0000 >Subject: [PATCH] Bug 21652: Unit test > >--- > t/db_dependent/Hold.t | 21 ++++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Hold.t b/t/db_dependent/Hold.t >index abeae5cc7a..d258e70c13 100755 >--- a/t/db_dependent/Hold.t >+++ b/t/db_dependent/Hold.t >@@ -29,7 +29,7 @@ use Koha::Item; > use Koha::DateUtils qw( dt_from_string ); > use t::lib::TestBuilder; > >-use Test::More tests => 34; >+use Test::More tests => 35; > use Test::Exception; > use Test::Warn; > >@@ -225,6 +225,25 @@ subtest "store() tests" => sub { > $schema->storage->txn_rollback(); > }; > >+subtest "set_waiting() tests" => sub { >+ >+ plan tests => 1; >+ >+ $schema->storage->txn_begin(); >+ >+ # Disable logging >+ t::lib::Mocks::mock_preference( 'HoldsLog', 0 ); >+ >+ my $hold = $builder->build_object({ class => 'Koha::Holds' }); >+ >+ $hold->waitingdate('2021-01-01'); >+ >+ $hold->set_waiting(); >+ >+ is($hold->waitingdate,'2021-01-01',"Setting waiting when already waiting should not update waitingdate"); >+ >+}; >+ > subtest "delete() tests" => sub { > > plan tests => 6; >-- >2.30.2
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 21652
:
129099
|
129100
|
129484
|
129485
|
129635
|
129636
|
129637