Bugzilla – Attachment 33528 Details for
Bug 11401
Add support for Norwegian national library card
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11401 - QA followup - Make the tests pass
Bug-11401---QA-followup---Make-the-tests-pass.patch (text/plain), 3.17 KB, created by
Magnus Enger
on 2014-11-13 18:47:07 UTC
(
hide
)
Description:
Bug 11401 - QA followup - Make the tests pass
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2014-11-13 18:47:07 UTC
Size:
3.17 KB
patch
obsolete
>From 80b887f1906e635c4e03ebfbb55e2ce301aa6a56 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <digitalutvikling@gmail.com> >Date: Thu, 13 Nov 2014 18:43:29 +0000 >Subject: [PATCH] Bug 11401 - QA followup - Make the tests pass > >The configs in koha-conf.xml needed to be mocked. There was also >a problem with how the NorwegianPatronDBEndpoint syspref was >getting checked in the .pm. >--- > Koha/NorwegianPatronDB.pm | 7 +++---- > t/NorwegianPatronDB.t | 10 +++++++--- > 2 files changed, 10 insertions(+), 7 deletions(-) > >diff --git a/Koha/NorwegianPatronDB.pm b/Koha/NorwegianPatronDB.pm >index c38d687..03afc21 100644 >--- a/Koha/NorwegianPatronDB.pm >+++ b/Koha/NorwegianPatronDB.pm >@@ -79,7 +79,6 @@ our %EXPORT_TAGS = ( all => [qw( > Exporter::export_ok_tags('all'); > > my $nl_uri = 'http://lanekortet.no'; >-my $nl_proxy = C4::Context->preference("NorwegianPatronDBEndpoint"); > > =head2 SOAP::Transport::HTTP::Client::get_basic_credentials > >@@ -156,7 +155,7 @@ sub NLSearch { > my $client = SOAP::Lite > ->on_action( sub { return '""';}) > ->uri( $nl_uri ) >- ->proxy( $nl_proxy ); >+ ->proxy( C4::Context->preference("NorwegianPatronDBEndpoint") ); > > my $id = SOAP::Data->type('string'); > $id->name('identifikator'); >@@ -236,7 +235,7 @@ sub NLSync { > my $client = SOAP::Lite > ->on_action( sub { return '""';}) > ->uri( $nl_uri ) >- ->proxy( $nl_proxy ); >+ ->proxy( C4::Context->preference("NorwegianPatronDBEndpoint") ); > > my $cardnumber = SOAP::Data->name( 'lnr' => $patron->cardnumber ); > >@@ -289,7 +288,7 @@ sub NLGetChanged { > my $client = SOAP::Lite > ->on_action( sub { return '""';}) > ->uri( $nl_uri ) >- ->proxy( $nl_proxy ); >+ ->proxy( C4::Context->preference("NorwegianPatronDBEndpoint") ); > > my $from_string; > if ( $from_arg && $from_arg ne '' ) { >diff --git a/t/NorwegianPatronDB.t b/t/NorwegianPatronDB.t >index acbe045..4f05d91 100644 >--- a/t/NorwegianPatronDB.t >+++ b/t/NorwegianPatronDB.t >@@ -16,7 +16,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More; >+use Test::More tests => 73; > use Test::MockModule; > use t::lib::Mocks; > use Data::Dumper; >@@ -113,10 +113,16 @@ Relevant sysprefs: > > =cut > >+BEGIN { >+ t::lib::Mocks::mock_config('nlkey', 'key'); >+ t::lib::Mocks::mock_config('nlvendoruser', 'user'); >+ t::lib::Mocks::mock_config('nlvendorpass', 'pass'); >+} > t::lib::Mocks::mock_preference('NorwegianPatronDBEnable', 0); > t::lib::Mocks::mock_preference('NorwegianPatronDBEndpoint', ''); > t::lib::Mocks::mock_preference('NorwegianPatronDBUsername', ''); > t::lib::Mocks::mock_preference('NorwegianPatronDBPassword', ''); >+ > ok( my $result = NLCheckSysprefs(), 'call NLCheckSysprefs() ok' ); > is( $result->{ 'error' }, 1, 'error detected' ); > is( $result->{ 'nlenabled' }, 0, 'NL is not enabled' ); >@@ -298,8 +304,6 @@ is( $res->{'melding'}, 'ingen treff', 'got "ingen treff"' ); > is( $res->{'antall_poster_returnert'}, 0, 'got 0 records' ); > is( $res->{'antall_treff'}, 0, 'got 0 records' ); > >-done_testing(); >- > =head1 SAMPLE SOAP XML RESPONSES > > These responses can be gathered by setting "outputxml()" to true on the SOAP >-- >1.7.10.4
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 11401
:
30752
|
31710
|
31711
|
31815
|
31816
|
32546
|
32607
|
32888
|
32889
|
32890
|
32949
|
32950
|
32951
|
32952
| 33528 |
33570
|
33582