Bugzilla – Attachment 129635 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.31 KB, created by
Jonathan Druart
on 2022-01-20 10:24:56 UTC
(
hide
)
Description:
Bug 21652: Unit test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-01-20 10:24:56 UTC
Size:
1.31 KB
patch
obsolete
>From c4fb359c2143189bd296d4bc875724e9f09739f2 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 > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > 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 abeae5cc7a9..d258e70c13a 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.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 21652
:
129099
|
129100
|
129484
|
129485
| 129635 |
129636
|
129637