Bugzilla – Attachment 75105 Details for
Bug 11943
Koha::Virtualshelfshare duplicates rows for the same list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11943: Add unit test for double accepts
Bug-11943-Add-unit-test-for-double-accepts.patch (text/plain), 1.92 KB, created by
Nick Clemens (kidclamp)
on 2018-05-07 11:29:43 UTC
(
hide
)
Description:
Bug 11943: Add unit test for double accepts
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-05-07 11:29:43 UTC
Size:
1.92 KB
patch
obsolete
>From af879c259f73efa780e38ba45906eee58cc8c21c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 4 May 2018 09:54:30 +0200 >Subject: [PATCH] Bug 11943: Add unit test for double accepts > >Test plan: >Run t/db_dependent/Virtualshelves.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/Virtualshelves.t | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Virtualshelves.t b/t/db_dependent/Virtualshelves.t >index 3e42c55..8b751fe 100644 >--- a/t/db_dependent/Virtualshelves.t >+++ b/t/db_dependent/Virtualshelves.t >@@ -90,7 +90,7 @@ subtest 'CRUD' => sub { > }; > > subtest 'Sharing' => sub { >- plan tests => 18; >+ plan tests => 21; > my $patron_wants_to_share = $builder->build({ > source => 'Borrower', > }); >@@ -152,6 +152,14 @@ subtest 'Sharing' => sub { > $number_of_shelves_shared = Koha::Virtualshelfshares->search->count; > is( $number_of_shelves_shared, 2, 'To be sure no shares have been removed' ); > >+ # Test double accept (BZ 11943) before removing the accepted share >+ my $third_share = $shelf_to_share->share('valid key number 2'); >+ is( Koha::Virtualshelfshares->search->count, 3, 'Three shares' ); >+ $is_accepted = $third_share->accept( 'valid key number 2', $share_with_me->{borrowernumber} ); >+ is( $is_accepted->shelfnumber, $shelf_to_share->shelfnumber, 'Accept returned the existing share' ); >+ is( Koha::Virtualshelfshares->search->count, 2, 'Check that number of shares went down again' ); >+ >+ # Remove the first accept > is( $shelf_to_share->remove_share( $share_with_me->{borrowernumber} ), 1, '1 share should have been removed if the shelf was shared with this patron' ); > $number_of_shelves_shared = Koha::Virtualshelfshares->search->count; > is( $number_of_shelves_shared, 1, 'To be sure the share has been removed' ); >-- >2.1.4
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 11943
:
75049
|
75050
|
75051
|
75104
|
75105
|
75106
|
75120
|
75121
|
75122
|
75246
|
75247