Bugzilla – Attachment 112425 Details for
Bug 23432
Stock rotation: cancelled transfer result in stockrotation failures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23432: (QA follow-up) Add a unit test
Bug-23432-QA-follow-up-Add-a-unit-test.patch (text/plain), 1.49 KB, created by
Nick Clemens (kidclamp)
on 2020-10-24 23:54:49 UTC
(
hide
)
Description:
Bug 23432: (QA follow-up) Add a unit test
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-10-24 23:54:49 UTC
Size:
1.49 KB
patch
obsolete
>From 7ac97677fc4588f8a289ab58a194d2e3b90a53e4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Sat, 24 Oct 2020 23:53:21 +0000 >Subject: [PATCH] Bug 23432: (QA follow-up) Add a unit test > >prove -v t/db_dependent/StockRotationItems.t > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/StockRotationItems.t | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/StockRotationItems.t b/t/db_dependent/StockRotationItems.t >index 7ec621a0ab..49da2cc304 100755 >--- a/t/db_dependent/StockRotationItems.t >+++ b/t/db_dependent/StockRotationItems.t >@@ -24,6 +24,7 @@ use DateTime::Duration; > use Koha::Database; > use Koha::Item::Transfer; > use t::lib::TestBuilder; >+use Test::Warn; > > use Test::More tests => 8; > >@@ -159,7 +160,7 @@ subtest "Tests for repatriate." => sub { > }; > > subtest "Tests for needs_advancing." => sub { >- plan tests => 6; >+ plan tests => 7; > $schema->storage->txn_begin; > > # Test behaviour of item freshly added to rota. >@@ -223,6 +224,8 @@ subtest "Tests for needs_advancing." => sub { > DateTime->now - DateTime::Duration->new( days => 75 ) > )->store; > is($dbitem->needs_advancing, 1, "Ready to be advanced."); >+ $dbtransfer->delete; >+ warning_is {$dbitem->needs_advancing} "We have no historical branch transfer for itemnumber " . $dbitem->itemnumber->itemnumber . "; This should not have happened!", "Missing transfer is warned."; > > $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 23432
:
110591
|
112405
|
112424
| 112425