Lines 85-91
subtest 'Build all sources' => sub {
Link Here
|
85 |
|
85 |
|
86 |
|
86 |
|
87 |
subtest 'Test length of some generated fields' => sub { |
87 |
subtest 'Test length of some generated fields' => sub { |
88 |
plan tests => 2; |
88 |
plan tests => 3; |
89 |
|
89 |
|
90 |
# Test the length of a returned character field |
90 |
# Test the length of a returned character field |
91 |
my $bookseller = $builder->build({ source => 'Aqbookseller' }); |
91 |
my $bookseller = $builder->build({ source => 'Aqbookseller' }); |
Lines 94-99
subtest 'Test length of some generated fields' => sub {
Link Here
|
94 |
'The length for a generated string (phone) should not be zero' ); |
94 |
'The length for a generated string (phone) should not be zero' ); |
95 |
is( length( $bookseller->{phone} ) <= $max, 1, |
95 |
is( length( $bookseller->{phone} ) <= $max, 1, |
96 |
'Check maximum length for a generated string (phone)' ); |
96 |
'Check maximum length for a generated string (phone)' ); |
|
|
97 |
|
98 |
my $item = $builder->build({ source => 'Item' }); |
99 |
is( $item->{replacementprice}, sprintf("%.2f", $item->{replacementprice}), "The number of decimals for floats should not be more than 2" ); |
97 |
}; |
100 |
}; |
98 |
|
101 |
|
99 |
|
102 |
|