Bugzilla – Attachment 30928 Details for
Bug 7290
New permission for receiving all (independent of library)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7290: Fix CanUserReceiveBasket tests
Bug-7290-Fix-CanUserReceiveBasket-tests.patch (text/plain), 1.80 KB, created by
Julian Maurice
on 2014-08-18 13:21:13 UTC
(
hide
)
Description:
Bug 7290: Fix CanUserReceiveBasket tests
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2014-08-18 13:21:13 UTC
Size:
1.80 KB
patch
obsolete
>From 78989dfc59f8667c3df06b9e87ede2b5c8ea372a Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Mon, 18 Aug 2014 15:12:34 +0200 >Subject: [PATCH] Bug 7290: Fix CanUserReceiveBasket tests > >CanUserReceiveBasket now verify the 'superlibrarian' status of user >using $userenv->{flags} (IsSuperLibrarian) >--- > t/Acquisition/CanUserReceiveBasket.t | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > >diff --git t/Acquisition/CanUserReceiveBasket.t t/Acquisition/CanUserReceiveBasket.t >index b0eb385..b7831e6 100644 >--- t/Acquisition/CanUserReceiveBasket.t >+++ t/Acquisition/CanUserReceiveBasket.t >@@ -21,7 +21,10 @@ my $baskets = { > } > }; > >-my $userenv = {}; >+my $userenv = { flags => 0 }; >+ >+sub BeSuperLibrarian { $userenv->{flags} = 1; } >+sub BeOrdinaryLibrarian { $userenv->{flags} = 0; } > > my $borrower = {}; > >@@ -38,7 +41,10 @@ my $order3 = { > $userenv->{branch} = 'B1'; > > # User can receive any orders thanks to his permissions >-ok( CanUserReceiveOrder($borrower, $order1, {superlibrarian => 1}) ); >+BeSuperLibrarian(); >+ok( CanUserReceiveOrder($borrower, $order1, {}) ); >+BeOrdinaryLibrarian(); >+ > ok( CanUserReceiveOrder($borrower, $order1, {acquisition => 1}) ); > ok( CanUserReceiveOrder($borrower, $order1, {acquisition => { order_receive_all => 1 }}) ); > >@@ -56,7 +62,10 @@ ok( not CanUserReceiveOrder($borrower, $order3, {acquisition => { order_receive > $userenv->{branch} = 'B2'; > > # User can receive any order thanks to his permissions >-ok( CanUserReceiveOrder($borrower, $order1, {superlibrarian => 1}) ); >+BeSuperLibrarian(); >+ok( CanUserReceiveOrder($borrower, $order1, {}) ); >+BeOrdinaryLibrarian(); >+ > ok( CanUserReceiveOrder($borrower, $order1, {acquisition => 1}) ); > ok( CanUserReceiveOrder($borrower, $order1, {acquisition => { order_receive_all => 1 }}) ); > >-- >1.9.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 7290
:
9314
|
9399
|
9944
|
11444
|
13214
|
14517
|
25068
|
26669
|
26671
|
26676
|
28386
|
28387
|
28388
|
28405
|
28406
|
28407
|
30337
|
30338
|
30339
|
30340
|
30926
|
30927
|
30928
|
32074
|
32075
|
32076
|
32077
|
35700
|
35701
|
35702
|
35935
|
35936
|
35937