Bugzilla – Attachment 86541 Details for
Bug 8995
Show OpenURL links in OPAC search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8995: (follow-up) Added test
Bug-8995-follow-up-Added-test.patch (text/plain), 1.85 KB, created by
Josef Moravec
on 2019-03-12 13:50:29 UTC
(
hide
)
Description:
Bug 8995: (follow-up) Added test
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2019-03-12 13:50:29 UTC
Size:
1.85 KB
patch
obsolete
>From c6a0844655d479e7fce23d6e0dae27bf2909e18f Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Tue, 12 Mar 2019 13:46:14 +0000 >Subject: [PATCH] Bug 8995: (follow-up) Added test > >--- > t/db_dependent/Biblio.t | 31 ++++++++++++++++++++++++++++++- > 1 file changed, 30 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Biblio.t b/t/db_dependent/Biblio.t >index 60ccde3a18..bf37fac840 100755 >--- a/t/db_dependent/Biblio.t >+++ b/t/db_dependent/Biblio.t >@@ -17,7 +17,7 @@ > > use Modern::Perl; > >-use Test::More tests => 11; >+use Test::More tests => 12; > use Test::MockModule; > use List::MoreUtils qw( uniq ); > use MARC::Record; >@@ -573,3 +573,32 @@ subtest 'MarcFieldForCreatorAndModifier' => sub { > # Cleanup > Koha::Caches->get_instance->clear_from_cache( "MarcSubfieldStructure-" ); > $schema->storage->txn_rollback; >+ >+subtest 'GetCOinSBiblio and GetOpenURLResolverURL' => sub { >+ plan tests => 2; >+ >+ $schema->storage->txn_begin; >+ >+ my $builder = t::lib::TestBuilder->new; >+ my $biblio = $builder->build_sample_biblio({ >+ title => 'Title 1', >+ author => 'Author 1' >+ }); >+ my $record = $biblio->metadata->record; >+ >+ t::lib::Mocks::mock_preference("OpenURLResolverURL", "https://koha.example.com/"); >+ >+ is( >+ C4::Biblio::GetCOinSBiblio($record), >+ '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', >+ 'GetCOinsBiblio returned right metadata' >+ ); >+ >+ is( >+ C4::Biblio::GetOpenURLResolverURL($record), >+ 'https://koha.example.com/?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', >+ 'GetOpenURLResolverURL returned right URL' >+ ); >+ >+ $schema->storage->txn_rollback; >+}; >-- >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 8995
:
13141
|
22753
|
23625
|
23626
|
23627
|
24087
|
24088
|
24089
|
26899
|
26900
|
26901
|
29357
|
29358
|
29359
|
30385
|
30386
|
30387
|
30388
|
30389
|
30390
|
35747
|
35916
|
40647
|
44639
|
48371
|
48372
|
55131
|
55132
|
55133
|
55134
|
55135
|
55136
|
55882
|
64513
|
64514
|
64515
|
64516
|
64517
|
64518
|
64519
|
64532
|
64533
|
64534
|
64535
|
64536
|
64537
|
64538
|
86483
|
86484
|
86485
|
86486
|
86487
|
86488
|
86489
|
86490
|
86491
|
86492
|
86541
|
86542
|
86557
|
86558
|
86559
|
86601
|
86602
|
86603
|
86604
|
86605
|
86606
|
86607
|
86608
|
86609
|
86610
|
88665
|
88666
|
88667
|
88668
|
88669
|
88670
|
88671
|
88672
|
88673
|
88735
|
88736
|
88737
|
88738
|
88739
|
88740
|
88741
|
88742
|
88743
|
88744
|
89012
|
89013
|
89014
|
89015
|
89120