View | Details | Raw Unified | Return to bug 20144
Collapse All | Expand All

(-)a/t/db_dependent/Serials/Numberpattern.t (-3 / +2 lines)
Lines 28-34 $numberpattern = {}; Link Here
28
$rv = ModSubscriptionNumberpattern($numberpattern);
28
$rv = ModSubscriptionNumberpattern($numberpattern);
29
is($rv, undef, "ModSubscriptionNumberpattern({}) returns undef");
29
is($rv, undef, "ModSubscriptionNumberpattern({}) returns undef");
30
# returns 0 because id doesn't exist
30
# returns 0 because id doesn't exist
31
$numberpattern = { id => 1, label => "Test numberpattern 1" };
31
$numberpattern = { id => 1, label => "Test numberpattern 1", description => '' };
32
$rv = ModSubscriptionNumberpattern($numberpattern);
32
$rv = ModSubscriptionNumberpattern($numberpattern);
33
is($rv, '0E0', "ModSubscriptionNumberpattern({id=1,label=>'Test numberpattern 1'}) returns '0 but true'");
33
is($rv, '0E0', "ModSubscriptionNumberpattern({id=1,label=>'Test numberpattern 1'}) returns '0 but true'");
34
34
Lines 38-44 is($id, undef, "AddSubscriptionNumberpattern(undef) returns undef"); Link Here
38
$numberpattern = {};
38
$numberpattern = {};
39
$id = AddSubscriptionNumberpattern($numberpattern);
39
$id = AddSubscriptionNumberpattern($numberpattern);
40
is($id, undef, "AddSubscriptionNumberpattern({}) returns undef");
40
is($id, undef, "AddSubscriptionNumberpattern({}) returns undef");
41
$numberpattern = { label => "Test numberpattern 1", numberingmethod => "{X}" };
41
$numberpattern = { label => "Test numberpattern 1", numberingmethod => "{X}", description => '' };
42
$id = AddSubscriptionNumberpattern($numberpattern);
42
$id = AddSubscriptionNumberpattern($numberpattern);
43
ok((defined($id) && ($id > 0)), "AddSubscriptionNumberpattern({label => 'Test numberpattern 1', numberingmethod => '{X}'}) returns numberpattern id");
43
ok((defined($id) && ($id > 0)), "AddSubscriptionNumberpattern({label => 'Test numberpattern 1', numberingmethod => '{X}'}) returns numberpattern id");
44
44
45
- 

Return to bug 20144