Browse Source
To test: 1 - Enable OverDrive and RecordedBooks (you can put anything in the prefs) 2 - Search on the opac - verify you get results (or search error) on first page of results' 3 - Go to second page of results - OD and RB are not searched 4 - Apply patch 5 - Verify nothing has changed If you have valid credentials: 1 - Enable RB prefs 2 - Sign in with an account that has an email matching your registered account for recordedbooks 3 - Confirm you RB account loads on opac-user.pl Otherwise: Read the patches, verify it all makes sense Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>19.05.x
7 changed files with 13 additions and 82 deletions
@ -1,55 +0,0 @@ |
|||
#!/usr/bin/perl |
|||
|
|||
# Copyright 2015 BibLibre |
|||
# |
|||
# This file is part of Koha. |
|||
# |
|||
# Koha is free software; you can redistribute it and/or modify it under the |
|||
# terms of the GNU General Public License as published by the Free Software |
|||
# Foundation; either version 3 of the License, or (at your option) any later |
|||
# version. |
|||
# |
|||
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY |
|||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
|||
# A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License along |
|||
# with Koha; if not, see <http://www.gnu.org/licenses>. |
|||
|
|||
use Modern::Perl; |
|||
use C4::Context; |
|||
use t::lib::Mocks qw(mock_preference); |
|||
use Test::More tests => 6; |
|||
|
|||
BEGIN { |
|||
use_ok('C4::External::OverDrive'); |
|||
} |
|||
|
|||
can_ok( |
|||
'C4::External::OverDrive', qw( |
|||
_request |
|||
IsOverDriveEnabled |
|||
GetOverDriveToken ) |
|||
); |
|||
|
|||
# ---------- Testing IsOverDriveEnabled --------- |
|||
|
|||
t::lib::Mocks::mock_preference( "OverDriveClientKey", 0 ); |
|||
t::lib::Mocks::mock_preference( "OverDriveClientSecret", 0 ); |
|||
|
|||
is( IsOverDriveEnabled(), 0, 'IsOverDriveEnabled fail' ); |
|||
|
|||
t::lib::Mocks::mock_preference( "OverDriveClientKey", 0 ); |
|||
t::lib::Mocks::mock_preference( "OverDriveClientSecret", 1 ); |
|||
|
|||
is( IsOverDriveEnabled(), 0, 'IsOverDriveEnabled fail' ); |
|||
|
|||
t::lib::Mocks::mock_preference( "OverDriveClientKey", 1 ); |
|||
t::lib::Mocks::mock_preference( "OverDriveClientSecret", 0 ); |
|||
|
|||
is( IsOverDriveEnabled(), 0, 'IsOverDriveEnabled fail' ); |
|||
|
|||
t::lib::Mocks::mock_preference( "OverDriveClientKey", 1 ); |
|||
t::lib::Mocks::mock_preference( "OverDriveClientSecret", 1 ); |
|||
|
|||
is( IsOverDriveEnabled(), 1, 'IsOverDriveEnabled success' ); |
Loading…
Reference in new issue