Bugzilla – Attachment 7238 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]
Added unit tests for C4/Serials.pm
0001-added-unit-tests-for-C4-Serials.pm.patch (text/plain), 3.11 KB, created by
Sam Sanders
on 2012-01-19 04:06:26 UTC
(
hide
)
Description:
Added unit tests for C4/Serials.pm
Filename:
MIME Type:
Creator:
Sam Sanders
Created:
2012-01-19 04:06:26 UTC
Size:
3.11 KB
patch
obsolete
>From a064cba9e0e6454e95625c5751f723cd26fb5a72 Mon Sep 17 00:00:00 2001 >From: Sam Sanders <sam-sanders@live.com> >Date: Thu, 19 Jan 2012 17:05:16 +1300 >Subject: [PATCH] added unit tests for C4/Serials.pm > >--- > t/db_dependent/Serials.t | 56 +++++++++++++++++++++++++++++++++++++++++++++- > 1 files changed, 55 insertions(+), 1 deletions(-) > >diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t >index 7097642..33f2ac6 100644 >--- a/t/db_dependent/Serials.t >+++ b/t/db_dependent/Serials.t >@@ -9,7 +9,7 @@ use YAML; > > use C4::Serials; > use C4::Debug; >-use Test::More tests => 5; >+use Test::More tests => 33; > > BEGIN { > use_ok('C4::Serials'); >@@ -40,3 +40,57 @@ if ($subscriptioninformation->{periodicity} % 16==0){ > my $expirationdate = GetExpirationDate(1) ; > ok( $expirationdate, "not NULL" ); > $debug && warn "$expirationdate"; >+ >+is(C4::Serials::GetLateIssues(),"0", 'test getting late issues'); >+ >+ok(C4::Serials::GetSubscriptionHistoryFromSubscriptionId(), 'test getting history from sub-scription'); >+ >+ok(C4::Serials::GetSerialStatusFromSerialId(), 'test getting Serial Status From Serial Id'); >+ >+ok(C4::Serials::GetSerialInformation(), 'test getting Serial Information'); >+ >+ok(C4::Serials::AddItem2Serial(), 'test adding item to serial'); >+ >+ok(C4::Serials::UpdateClaimdateIssues(), 'test updating claim date'); >+ >+ok(C4::Serials::GetFullSubscription(), 'test getting full subscription'); >+ >+ok(C4::Serials::PrepareSerialsData(), 'test preparing serial data'); >+ >+ok(C4::Serials::GetSubscriptionsFromBiblionumber(), 'test getting subscriptions form biblio number'); >+ >+is(C4::Serials::GetSerials(),"0", 'test getting serials when you enter nothing'); >+is(C4::Serials::GetSerials2(),"0", 'test getting serials when you enter nothing'); >+ >+ok(C4::Serials::GetLatestSerials(), 'test getting lastest serials'); >+ >+is(C4::Serials::GetDistributedTo(),"0", 'test getting distributed when nothing is entered'); >+ >+is(C4::Serials::GetNextSeq(),"0", 'test getting next seq when you enter nothing'); >+ >+is(C4::Serials::GetSeq(),undef, 'test getting seq when you enter nothing'); >+ >+is(C4::Serials::CountSubscriptionFromBiblionumber(),"0", 'test counting subscription when nothing is entered'); >+ >+is(C4::Serials::ModSubscriptionHistory(),"0", 'test modding subscription history'); >+ >+is(C4::Serials::ModSerialStatus(),undef, 'test modding serials'); >+ >+is(C4::Serials::NewIssue(),"0", 'test getting 0 when nothing is entered'); >+ >+is(C4::Serials::ItemizeSerials(),undef, 'test getting nothing when nothing is entered'); >+ >+ok(C4::Serials::HasSubscriptionStrictlyExpired(), 'test if the subscriptions has expired'); >+is(C4::Serials::HasSubscriptionExpired(),"0", 'test if the subscriptions has expired'); >+ >+is(C4::Serials::GetLateOrMissingIssues(),"0", 'test getting last or missing issues'); >+ >+is(C4::Serials::removeMissingIssue(),undef, 'test removing a missing issue'); >+ >+is(C4::Serials::updateClaim(),undef, 'test updating claim'); >+ >+is(C4::Serials::getsupplierbyserialid(),undef, 'test getting supplier idea'); >+ >+is(C4::Serials::check_routing(),"0", 'test checking route'); >+ >+is(C4::Serials::addroutingmember(),undef, 'test adding route member'); >-- >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