|
Lines 31-37
my $builder = t::lib::TestBuilder->new;
Link Here
|
| 31 |
|
31 |
|
| 32 |
subtest 'is_valid' => sub { |
32 |
subtest 'is_valid' => sub { |
| 33 |
|
33 |
|
| 34 |
plan tests => 21; |
34 |
plan tests => 23; |
| 35 |
|
35 |
|
| 36 |
$schema->storage->txn_begin; |
36 |
$schema->storage->txn_begin; |
| 37 |
|
37 |
|
|
Lines 92-97
subtest 'is_valid' => sub {
Link Here
|
| 92 |
ok( !$policy->is_valid( q{1234567890123456} ), "1234567890123456 is longer than $pref"); |
92 |
ok( !$policy->is_valid( q{1234567890123456} ), "1234567890123456 is longer than $pref"); |
| 93 |
ok( !$policy->is_valid( q{1234567890} ), "1234567890 is longer than $pref"); |
93 |
ok( !$policy->is_valid( q{1234567890} ), "1234567890 is longer than $pref"); |
| 94 |
|
94 |
|
|
|
95 |
ok( $policy->is_valid(undef), "If cardnumber is null, we assume they're allowed") ; |
| 96 |
ok( !$policy->is_valid(""), "Empty string is not correct" ); |
| 97 |
|
| 95 |
$schema->storage->txn_rollback; |
98 |
$schema->storage->txn_rollback; |
| 96 |
}; |
99 |
}; |
| 97 |
|
100 |
|
| 98 |
- |
|
|