From d138421da84240a32cc556da4ddea2fc187e1f79 Mon Sep 17 00:00:00 2001
From: Josef Moravec <josef.moravec@gmail.com>
Date: Wed, 13 Mar 2019 08:30:32 +0000
Subject: [PATCH] Bug 8995: (follow-up) Add one more test fot get_openurl
Test plan:
prove t/db_dependent/Koha/Biblio.t
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
---
t/db_dependent/Koha/Biblio.t | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t
index 86bcbf0b08..6b3faf94df 100644
--- a/t/db_dependent/Koha/Biblio.t
+++ b/t/db_dependent/Koha/Biblio.t
@@ -111,7 +111,7 @@ subtest 'items() tests' => sub {
subtest 'get_coins and get_openurl' => sub {
- plan tests => 2;
+ plan tests => 3;
$schema->storage->txn_begin;
@@ -134,5 +134,12 @@ subtest 'get_coins and get_openurl' => sub {
'Koha::Biblio->get_openurl returned right URL'
);
+ t::lib::Mocks::mock_preference("OpenURLResolverURL", "https://koha.example.com/?client_id=ci1");
+ is(
+ $biblio->get_openurl,
+ 'https://koha.example.com/?client_id=ci1&ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Title%201&rft.au=Author%201',
+ 'Koha::Biblio->get_openurl returned right URL'
+ );
+
$schema->storage->txn_rollback;
};
--
2.20.1