|
Lines 84-90
subtest 'Build all sources' => sub {
Link Here
|
| 84 |
|
84 |
|
| 85 |
|
85 |
|
| 86 |
subtest 'Test length of some generated fields' => sub { |
86 |
subtest 'Test length of some generated fields' => sub { |
| 87 |
plan tests => 3; |
87 |
plan tests => 4; |
| 88 |
|
88 |
|
| 89 |
# Test the length of a returned character field |
89 |
# Test the length of a returned character field |
| 90 |
my $bookseller = $builder->build({ source => 'Aqbookseller' }); |
90 |
my $bookseller = $builder->build({ source => 'Aqbookseller' }); |
|
Lines 96-101
subtest 'Test length of some generated fields' => sub {
Link Here
|
| 96 |
|
96 |
|
| 97 |
my $item = $builder->build({ source => 'Item' }); |
97 |
my $item = $builder->build({ source => 'Item' }); |
| 98 |
is( $item->{replacementprice}, sprintf("%.2f", $item->{replacementprice}), "The number of decimals for floats should not be more than 2" ); |
98 |
is( $item->{replacementprice}, sprintf("%.2f", $item->{replacementprice}), "The number of decimals for floats should not be more than 2" ); |
|
|
99 |
my $accountline = $builder->build({ source => 'Accountline' }); |
| 100 |
is( $accountline->{amountoutstanding}, |
| 101 |
sprintf("%.6f", $accountline->{amountoutstanding}), |
| 102 |
"There can be more decimals when the column size allows it." ); |
| 103 |
|
| 99 |
}; |
104 |
}; |
| 100 |
|
105 |
|
| 101 |
|
106 |
|
| 102 |
- |
|
|