Bugzilla – Attachment 120216 Details for
Bug 17202
Deleting a rotating collection with items should either be prohibited or items should be removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17202: Unit tests
Bug-17202-Unit-tests.patch (text/plain), 1.55 KB, created by
Nick Clemens (kidclamp)
on 2021-04-27 12:53:53 UTC
(
hide
)
Description:
Bug 17202: Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-04-27 12:53:53 UTC
Size:
1.55 KB
patch
obsolete
>From a7a4a0b331150a8449890abc459545e0ed32eecd Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 27 Apr 2021 12:48:26 +0000 >Subject: [PATCH] Bug 17202: Unit tests > >--- > t/db_dependent/RotatingCollections.t | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/RotatingCollections.t b/t/db_dependent/RotatingCollections.t >index 7ea21c4c7b..1db4e45a37 100755 >--- a/t/db_dependent/RotatingCollections.t >+++ b/t/db_dependent/RotatingCollections.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 51; >+use Test::More tests => 53; > use C4::Context; > use C4::RotatingCollections; > use C4::Biblio; >@@ -316,6 +316,9 @@ is( C4::RotatingCollections::isItemInThisCollection($item_id1), > is( C4::RotatingCollections::isItemInThisCollection(), > 0, "isItemInThisCollection returns 0 if no params given" ); > >+#Re-add item to test deletion of collection >+AddItemToCollection( $collection_id1, $item_id1 ); >+ > #Test DeleteCollection > is( DeleteCollection($collection_id2), 1, "Collection2 deleted" ); > is( DeleteCollection($collection_id1), 1, "Collection1 deleted" ); >@@ -330,3 +333,15 @@ is( > $countcollection + 1, > "Two Collections have been deleted" > ); >+ >+is( C4::RotatingCollections::isItemInAnyCollection($item_id1), >+ 0, "Item1 is no longer in a collection after it is deleted" ); >+is( >+ C4::RotatingCollections::isItemInThisCollection( >+ $item_id1, $collection_id1 >+ ), >+ 0, >+ "Item1 is not in the deleted Collection1" >+); >+ >+$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 17202
:
119306
|
119330
|
120099
|
120100
| 120216 |
120217
|
120218
|
120219