Bugzilla – Attachment 79671 Details for
Bug 17602
Integrate support for RecordedBooks (formerly OneClickDigital) API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17602 follow-up: t/Koha_ExternalContent_RecordedBooks.t
Bug-17602-follow-up-tKohaExternalContentRecordedBo.patch (text/plain), 2.13 KB, created by
Jonathan Druart
on 2018-09-30 23:25:51 UTC
(
hide
)
Description:
Bug 17602 follow-up: t/Koha_ExternalContent_RecordedBooks.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-09-30 23:25:51 UTC
Size:
2.13 KB
patch
obsolete
>From 0e3078e85b960cfe59c10b252f487fda92c6ec68 Mon Sep 17 00:00:00 2001 >From: Srdjan <srdjan@catalyst.net.nz> >Date: Tue, 10 Oct 2017 14:26:22 +1300 >Subject: [PATCH] Bug 17602 follow-up: t/Koha_ExternalContent_RecordedBooks.t > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/Koha_ExternalContent_RecordedBooks.t | 41 ++++++++++++++++++++++++++++++++++ > 1 file changed, 41 insertions(+) > create mode 100755 t/Koha_ExternalContent_RecordedBooks.t > >diff --git a/t/Koha_ExternalContent_RecordedBooks.t b/t/Koha_ExternalContent_RecordedBooks.t >new file mode 100755 >index 0000000000..e6db9aacef >--- /dev/null >+++ b/t/Koha_ExternalContent_RecordedBooks.t >@@ -0,0 +1,41 @@ >+#!/usr/bin/env perl >+ >+use Modern::Perl; >+ >+use t::lib::Mocks; >+use Test::More; >+use Test::MockModule; >+ >+use Module::Load::Conditional qw( can_load ); >+ >+plan tests => 3; >+ >+SKIP: { >+ skip "cannot find WebService::ILS::RecordedBooks::Partner", 5 >+ unless can_load( modules => { 'WebService::ILS::RecordedBooks::Patron' => undef } ); >+ >+ use_ok('Koha::ExternalContent::RecordedBooks'); >+ >+ t::lib::Mocks::mock_preference('SessionStorage','tmp'); >+ >+ t::lib::Mocks::mock_preference('RecordedBooksLibraryID', 'DUMMY'); >+ t::lib::Mocks::mock_preference('RecordedBooksClientSecret', 'DUMMY'); >+ t::lib::Mocks::mock_preference('RecordedBooksDomain', 'DUMMY'); >+ >+ my $client = Koha::ExternalContent::RecordedBooks->new(); >+ local $@; >+ eval { $client->search({query => "art"}) }; >+ ok($@ =~ /not authorized/, "Invalid RecordedBooks partner credentials"); >+ >+ SKIP: { >+ skip "no RecordedBooks partner credentials", 1 unless $ENV{RECORDEDBOOKS_TEST_LIBRARY_ID}; >+ >+ t::lib::Mocks::mock_preference('RecordedBooksLibraryID', $ENV{RECORDEDBOOKS_TEST_LIBRARY_ID}); >+ t::lib::Mocks::mock_preference('RecordedBooksClientSecret', $ENV{RECORDEDBOOKS_TEST_CLIENT_SECRET}); >+ t::lib::Mocks::mock_preference('RecordedBooksDomain', $ENV{RECORDEDBOOKS_TEST_DOMAIN}); >+ >+ $client = Koha::ExternalContent::RecordedBooks->new(); >+ my $res = $client->search({query => "art"}); >+ ok($res->{items}, "search") >+ } >+} >-- >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 17602
:
57402
|
57403
|
57404
|
60855
|
60856
|
60857
|
61866
|
61932
|
62247
|
62248
|
62249
|
62250
|
63392
|
63778
|
63779
|
63780
|
63857
|
64070
|
64071
|
64095
|
64096
|
64098
|
64099
|
64100
|
65988
|
65989
|
66341
|
66342
|
66343
|
67236
|
67237
|
67238
|
67240
|
67859
|
67860
|
69019
|
69020
|
69021
|
69022
|
69023
|
69024
|
69025
|
69026
|
69027
|
69101
|
69357
|
69358
|
69359
|
73708
|
73709
|
73710
|
73711
|
73712
|
73713
|
73714
|
73715
|
73716
|
73717
|
73718
|
73719
|
73725
|
76180
|
76181
|
76182
|
76183
|
76184
|
76185
|
76186
|
76187
|
76188
|
76189
|
76190
|
76191
|
76192
|
76193
|
78602
|
78603
|
78604
|
78605
|
78606
|
78607
|
78608
|
78609
|
78610
|
78611
|
78612
|
78613
|
78614
|
78615
|
79247
|
79668
|
79669
|
79670
| 79671 |
79672
|
79673
|
79674
|
79675
|
79676
|
79677
|
79678
|
79679
|
79680
|
79681
|
79682
|
79752