added fixEthnicity tests
This commit is contained in:
parent
71d99472ca
commit
d7fe4f77a0
29
koha.t
29
koha.t
|
|
@ -1,9 +1,12 @@
|
|||
BEGIN { $| = 1; print "1..2\n"; }
|
||||
BEGIN { $| = 1; print "1..6\n"; }
|
||||
END {print "not ok 1\n" unless $loaded;}
|
||||
use C4::Koha;
|
||||
$loaded = 1;
|
||||
print "ok 1\n";
|
||||
|
||||
#
|
||||
# test that &slashifyDate returns correct (non-US) date
|
||||
#
|
||||
$date = "01/01/2002";
|
||||
$newdate = &slashifyDate("2002-01-01");
|
||||
|
||||
|
|
@ -12,3 +15,27 @@ if ($date eq $newdate) {
|
|||
} else {
|
||||
print "not ok 2\n";
|
||||
}
|
||||
|
||||
#
|
||||
# Check that &fixEthnicity returns correct values
|
||||
#
|
||||
if ('Maori' eq fixEthnicity('maori') {
|
||||
print "ok 3\n";
|
||||
} else {
|
||||
print "not ok 3\n";
|
||||
}
|
||||
if ('European/Pakeha' eq fixEthnicity('european') {
|
||||
print "ok 4\n";
|
||||
} else {
|
||||
print "not ok 4\n";
|
||||
}
|
||||
if ('Pacific Islander' eq fixEthnicity('pi') {
|
||||
print "ok 5\n";
|
||||
} else {
|
||||
print "not ok 5\n";
|
||||
}
|
||||
if ('Asian' eq fixEthnicity('asian') {
|
||||
print "ok 6\n";
|
||||
} else {
|
||||
print "not ok 6\n";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue