From f8009c165b56d3f3a4d48bff4d2d67f678d9464a Mon Sep 17 00:00:00 2001 From: Sam Sanders Date: Wed, 18 Jan 2012 11:38:20 +1300 Subject: [PATCH] t/Koha.t Content-Type: text/plain; charset="utf-8" http://koha-community.org http://bugs.koha-community.org/show_bug.cgi?id=5327 Signed-off-by: Mason James http://bugs.koha-community.org/show_bug.cgi?id=7592 --- t/Koha.t | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 44 insertions(+), 1 deletions(-) diff --git a/t/Koha.t b/t/Koha.t index 025ab98..b3e6f32 100755 --- a/t/Koha.t +++ b/t/Koha.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 31; use_ok('C4::Koha'); @@ -28,4 +28,47 @@ is(C4::Koha::_isbn_cleanup('0-590-35340-3'), '0590353403', '_isbn_cleanup remove is(C4::Koha::_isbn_cleanup('0590353403 (pbk.)'), '0590353403', '_isbn_cleanup removes parenthetical'); is(C4::Koha::_isbn_cleanup('978-0-321-49694-2'), '0321496949', '_isbn_cleanup converts ISBN-13 to ISBN-10'); +is(C4::Koha::GetSupportName('BK'),"Books", 'testing support name'); +is(C4::Koha::GetSupportName(''),undef, 'testing support name'); +ok(C4::Koha::GetSupportList(), 'testing support list'); +ok(C4::Koha::GetItemTypes(), 'testing get items'); + +ok(C4::Koha::GetCcodes(), 'testing get codes'); + +ok(C4::Koha::getframeworks(), 'test getting frameworks'); + +ok(C4::Koha::getframeworkinfo('fa') , 'test getting framework info'); + +my $typeinfo=C4::Koha::getitemtypeinfo('BK'); +is ($typeinfo->{description},"Books", 'test getting item type'); + +ok(C4::Koha::getitemtypeimagedir() , 'test getting image type'); + +ok(C4::Koha::getitemtypeimagesrc() , 'test image source'); + +ok(C4::Koha::GetPrinters() , 'test getting printers'); + +is(C4::Koha::getnbpages('100','50'),"2", 'test if it returns the number of pages, given the number of items and the number of items per page.'); + +ok(C4::Koha::getallthemes() , 'test getting array of themes'); + +ok(C4::Koha::getFacets() , 'test getting facts'); + +ok(C4::Koha::get_notforloan_label_of(), 'test getting get not for label of'); + +ok(C4::Koha::displayServers(), 'test displaying Servers'); + +is(C4::Koha::GetAuthValCode(''),"",'test getting auth value codes'); + +ok(C4::Koha::GetAuthorisedValueCategories(), 'test getting an arrayref of all of the available authorised value categories.'); + +is(C4::Koha::GetAuthorisedValueByCode(), undef, 'Testing GetAuthorisedValyeByCode returns undef when supplied no code'); + +is(C4::Koha::GetKohaAuthorisedValues(), undef, 'test getting authorised values'); + +is(C4::Koha::GetKohaAuthorisedValuesFromField(), undef, 'test getting authorised values from a field'); + +is(C4::Koha::GetKohaAuthorisedValueLib(), undef, 'test getting authorised values'); + +is(C4::Koha::GetNormalizedISBN(), undef, 'test if GetNormalizedISBN is null returns undef with no arguments'); -- 1.7.2.5