Bugzilla – Attachment 6373 Details for
Bug 5327
Omnibus for unit tests required for all C4 modules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Adds missing case for boolean unit tests, adds in actual unit tests for barkertaylor
boolean_barkertaylor_unit_tests.patch (text/plain), 2.94 KB, created by
Chris Hall
on 2011-11-22 00:29:14 UTC
(
hide
)
Description:
Adds missing case for boolean unit tests, adds in actual unit tests for barkertaylor
Filename:
MIME Type:
Creator:
Chris Hall
Created:
2011-11-22 00:29:14 UTC
Size:
2.94 KB
patch
obsolete
>From 49a5970ab455a9f9306dbc2cca83166e64c8ad84 Mon Sep 17 00:00:00 2001 >From: Chris Hall <chrish@catalyst.net.nz> >Date: Tue, 22 Nov 2011 10:08:02 +1300 >Subject: [PATCH 1/2] Added reference case to Boolean.pm unit test > >--- > t/Boolean.t | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > >diff --git a/t/Boolean.t b/t/Boolean.t >index fb3b0bf..af5c8b7 100755 >--- a/t/Boolean.t >+++ b/t/Boolean.t >@@ -19,3 +19,4 @@ is( true_p('YES'), '1', 'verified case insensitivity' ); > > is( true_p(undef), undef, 'recognizes undefined as not boolean' ); > is( true_p('foo'), undef, 'recognizes \'foo\' as not boolean' ); >+is( true_p([]), undef, 'recognizes a reference as not a boolean' ); >-- >1.7.4.1 > > >From 6dd9df1b0ff6f24fe6ed0c91078fb393f3ba26b9 Mon Sep 17 00:00:00 2001 >From: Chris Hall <chrish@catalyst.net.nz> >Date: Tue, 22 Nov 2011 12:19:55 +1300 >Subject: [PATCH 2/2] Unit tests for C4/Exteral/BakerTaylor.pm > >--- > t/db_dependent/External_BakerTaylor.t | 28 ++++++++++++++++++++++++---- > 1 files changed, 24 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/External_BakerTaylor.t b/t/db_dependent/External_BakerTaylor.t >index fdccaee..e6e6118 100755 >--- a/t/db_dependent/External_BakerTaylor.t >+++ b/t/db_dependent/External_BakerTaylor.t >@@ -1,14 +1,34 @@ > #!/usr/bin/perl >-# >-# This Koha test module is a stub! >-# Add more tests here!!! >+ >+# some simple tests of the elements of C4::External::BakerTaylor that do not require a valid username and password > > use strict; > use warnings; > >-use Test::More tests => 1; >+use Test::More tests => 9; > > BEGIN { > use_ok('C4::External::BakerTaylor'); > } > >+# for testing, to avoid using C4::Context >+my $username="testing_username"; >+my $password="testing_password"; >+ >+# taken from C4::External::BakerTaylor::initialize >+my $image_url = "http://contentcafe2.btol.com/ContentCafe/Jacket.aspx?UserID=$username&Password=$password&Options=Y&Return=T&Type=S&Value="; >+ >+# test without initializing >+is( C4::External::BakerTaylor::image_url(), undef, "testing image url pre initilization"); >+is( C4::External::BakerTaylor::link_url(), undef, "testing link url pre initilization"); >+is( C4::External::BakerTaylor::content_cafe_url(""), undef, "testing content cafe url pre initilization"); >+is( C4::External::BakerTaylor::http_jacket_link(""), undef, "testing http jacket link pre initilization"); >+is( C4::External::BakerTaylor::availability(""), undef, "testing availability pre initilization"); >+ >+# intitialize >+C4::External::BakerTaylor::initialize($username, $password, "link_url"); >+ >+# testing basic results >+is( C4::External::BakerTaylor::image_url("aa"), $image_url."aa", "testing image url construction"); >+is( C4::External::BakerTaylor::link_url("bb"), "link_urlbb", "testing link url construction"); >+is( C4::External::BakerTaylor::content_cafe_url("cc"), "http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=$username&Password=$password&Options=Y&ItemKey=cc", "testing content cafe url construction"); >-- >1.7.4.1 >
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 5327
:
2716
|
2726
|
5485
|
6236
|
6237
|
6373
|
6560
|
6561
|
6562
|
6563
|
6613
|
6614
|
6616
|
6620
|
6621
|
6622
|
6643
|
6650
|
6655
|
6679
|
6681
|
6682
|
6683
|
6726
|
6727
|
6728
|
6729
|
6730
|
6731
|
6732
|
6795
|
6799
|
6805
|
6819
|
6826
|
6827
|
6828
|
6834
|
7179
|
7180
|
7181
|
7182
|
7183
|
7184
|
7185
|
7186
|
7187
|
7188
|
7189
|
7190
|
7191
|
7192
|
7194
|
7195
|
7203
|
7206
|
7208
|
7209
|
7220
|
7221
|
7222
|
7223
|
7224
|
7225
|
7226
|
7227
|
7228
|
7229
|
7230
|
7231
|
7232
|
7233
|
7234
|
7235
|
7236
|
7237
|
7238
|
7239
|
7240
|
7241
|
7242
|
7400
|
7402
|
7403
|
7405
|
7573
|
7592
|
7593
|
7594
|
9897
|
10234
|
10616
|
10656
|
10659
|
10660
|
10661
|
10680
|
11141
|
11186
|
11212
|
11213
|
11278
|
11279
|
11280
|
11281
|
11339
|
11340
|
11341
|
11440
|
11467
|
11469
|
11470
|
11471
|
11472
|
11473
|
11500
|
11503
|
11505
|
11506
|
11633
|
11762
|
11763
|
11764
|
11765
|
11846
|
11985
|
11993
|
12002
|
12003