Bugzilla – Attachment 78125 Details for
Bug 21231
BlockReturnofLostItems does not prevent lost items being found
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21231: Add Unit Test
Bug-21231-Add-Unit-Test.patch (text/plain), 1.33 KB, created by
Kyle M Hall (khall)
on 2018-08-24 11:18:39 UTC
(
hide
)
Description:
Bug 21231: Add Unit Test
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-08-24 11:18:39 UTC
Size:
1.33 KB
patch
obsolete
>From d91d7b01731fa8a6c0e9df47a75d188035275656 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutiosn.com> >Date: Thu, 16 Aug 2018 07:10:43 -0400 >Subject: [PATCH] Bug 21231: Add Unit Test > >--- > t/db_dependent/Circulation/Returns.t | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation/Returns.t b/t/db_dependent/Circulation/Returns.t >index 50f733bb52..bd21347694 100644 >--- a/t/db_dependent/Circulation/Returns.t >+++ b/t/db_dependent/Circulation/Returns.t >@@ -337,7 +337,7 @@ subtest 'Handle ids duplication' => sub { > }; > > subtest 'BlockReturnOfLostItems' => sub { >- plan tests => 3; >+ plan tests => 4; > my $biblio = $builder->build_object( { class => 'Koha::Biblios' } ); > my $item = $builder->build_object( > { >@@ -361,6 +361,9 @@ subtest 'BlockReturnOfLostItems' => sub { > is( $doreturn, 0, "With BlockReturnOfLostItems, a checkin of a lost item should be blocked"); > is( $messages->{WasLost}, 1, "... and the WasLost flag should be set"); > >+ $item->discard_changes; >+ is( $item->itemlost, 1, "Item remains lost" ); >+ > t::lib::Mocks::mock_preference('BlockReturnOfLostItems', 0); > ( $doreturn, $messages, $issue ) = AddReturn($item->barcode); > is( $doreturn, 1, "Without BlockReturnOfLostItems, a checkin of a lost item should not be blocked"); >-- >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 21231
:
77892
|
77893
|
77894
|
78121
|
78122
|
78123
|
78124
|
78125
|
78126
|
78127
|
78128
|
78129
|
78130
|
78143
|
78144
|
78303
|
78304