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 => 4; |
87 |
plan tests => 6; |
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 101-106
subtest 'Test length of some generated fields' => sub {
Link Here
|
101 |
sprintf("%.6f", $accountline->{amountoutstanding}), |
101 |
sprintf("%.6f", $accountline->{amountoutstanding}), |
102 |
"There can be more decimals when the column size allows it." ); |
102 |
"There can be more decimals when the column size allows it." ); |
103 |
|
103 |
|
|
|
104 |
my $rs = $schema->source('Accountline')->resultset; |
105 |
my $accountline_dbix = $rs->find($accountline->{accountlines_id}); |
106 |
is( $accountline->{amountoutstanding}, $accountline_dbix->amountoutstanding, |
107 |
"decimal - Builder builds same precision as DBIx returns." ); |
108 |
|
109 |
my $aqorder = $builder->build({ source => 'Aqorder' }); |
110 |
$rs = $schema->source('Aqorder')->resultset; |
111 |
my $aqorder_dbix = $rs->find($aqorder->{ordernumber}); |
112 |
is( $aqorder->{discount}, $aqorder_dbix->discount, |
113 |
"float - Builder builds same precision as DBIx returns." ); |
114 |
|
104 |
}; |
115 |
}; |
105 |
|
116 |
|
106 |
|
117 |
|
107 |
- |
|
|