|
Lines 16-22
Link Here
|
| 16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
use Test::More; |
19 |
use Test::More tests => 73; |
| 20 |
use Test::MockModule; |
20 |
use Test::MockModule; |
| 21 |
use t::lib::Mocks; |
21 |
use t::lib::Mocks; |
| 22 |
use Data::Dumper; |
22 |
use Data::Dumper; |
|
Lines 113-122
Relevant sysprefs:
Link Here
|
| 113 |
|
113 |
|
| 114 |
=cut |
114 |
=cut |
| 115 |
|
115 |
|
|
|
116 |
BEGIN { |
| 117 |
t::lib::Mocks::mock_config('nlkey', 'key'); |
| 118 |
t::lib::Mocks::mock_config('nlvendoruser', 'user'); |
| 119 |
t::lib::Mocks::mock_config('nlvendorpass', 'pass'); |
| 120 |
} |
| 116 |
t::lib::Mocks::mock_preference('NorwegianPatronDBEnable', 0); |
121 |
t::lib::Mocks::mock_preference('NorwegianPatronDBEnable', 0); |
| 117 |
t::lib::Mocks::mock_preference('NorwegianPatronDBEndpoint', ''); |
122 |
t::lib::Mocks::mock_preference('NorwegianPatronDBEndpoint', ''); |
| 118 |
t::lib::Mocks::mock_preference('NorwegianPatronDBUsername', ''); |
123 |
t::lib::Mocks::mock_preference('NorwegianPatronDBUsername', ''); |
| 119 |
t::lib::Mocks::mock_preference('NorwegianPatronDBPassword', ''); |
124 |
t::lib::Mocks::mock_preference('NorwegianPatronDBPassword', ''); |
|
|
125 |
|
| 120 |
ok( my $result = NLCheckSysprefs(), 'call NLCheckSysprefs() ok' ); |
126 |
ok( my $result = NLCheckSysprefs(), 'call NLCheckSysprefs() ok' ); |
| 121 |
is( $result->{ 'error' }, 1, 'error detected' ); |
127 |
is( $result->{ 'error' }, 1, 'error detected' ); |
| 122 |
is( $result->{ 'nlenabled' }, 0, 'NL is not enabled' ); |
128 |
is( $result->{ 'nlenabled' }, 0, 'NL is not enabled' ); |
|
Lines 298-305
is( $res->{'melding'}, 'ingen treff', 'got "ingen treff"' );
Link Here
|
| 298 |
is( $res->{'antall_poster_returnert'}, 0, 'got 0 records' ); |
304 |
is( $res->{'antall_poster_returnert'}, 0, 'got 0 records' ); |
| 299 |
is( $res->{'antall_treff'}, 0, 'got 0 records' ); |
305 |
is( $res->{'antall_treff'}, 0, 'got 0 records' ); |
| 300 |
|
306 |
|
| 301 |
done_testing(); |
|
|
| 302 |
|
| 303 |
=head1 SAMPLE SOAP XML RESPONSES |
307 |
=head1 SAMPLE SOAP XML RESPONSES |
| 304 |
|
308 |
|
| 305 |
These responses can be gathered by setting "outputxml()" to true on the SOAP |
309 |
These responses can be gathered by setting "outputxml()" to true on the SOAP |
| 306 |
- |
|
|