Bug 10277: Add UT for C4::Context::IsSuperLibrarian
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 18 Dec 2013 15:12:00 +0000 (16:12 +0100)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 30 Dec 2013 15:47:46 +0000 (15:47 +0000)
commit3e866d216db008e1ed8c8614f6758ad5118321df
tree2a8a4289bfe1e7b16860fcf725d359986c4b2b32
parentfb4025b67b45e60154f67b9acca3d56e4f5eb7c5
Bug 10277: Add UT for C4::Context::IsSuperLibrarian

Note that I modify the return value. Before this patch, it returned an
empty string or 1. Now it returns 0 or 1.

Test plan:
- same as the original patch
- verify that unit tests pass:
    prove t/Context.t

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, including new tests.
Checked the code and tested superlibrarian behaviour in some places:

moremember.pl:
With IndyBranches only superlibrarian can delete borrowers from
other branches. Accessing the borrower with a direct link.
OK

C4/Members.pm
With IndyBranches only superlibrarian can search for borrowres
from other branches.
OK

tools/holidays.pl
With IndyBranches only superlibrarian can edit holidays for other
branches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Context.pm
t/Context.t