Lines 108-114
subtest 'list() tests' => sub {
Link Here
|
108 |
|
108 |
|
109 |
subtest 'get() tests' => sub { |
109 |
subtest 'get() tests' => sub { |
110 |
|
110 |
|
111 |
plan tests => 6; |
111 |
plan tests => 8; |
112 |
|
112 |
|
113 |
$schema->storage->txn_begin; |
113 |
$schema->storage->txn_begin; |
114 |
|
114 |
|
Lines 137-142
subtest 'get() tests' => sub {
Link Here
|
137 |
->status_is(404) |
137 |
->status_is(404) |
138 |
->json_is( '/error' => 'Order not found' ); |
138 |
->json_is( '/error' => 'Order not found' ); |
139 |
|
139 |
|
|
|
140 |
# Regression tests for bug 25513 |
141 |
# Pick a high value that could be transformed into exponential |
142 |
# representation and not considered a number by buggy DBD::mysql versions |
143 |
$order = $builder->build_object( |
144 |
{ |
145 |
class => 'Koha::Acquisition::Orders', |
146 |
value => { |
147 |
orderstatus => 'new', |
148 |
ecost_tax_excluded => 9963405519357589504, |
149 |
unitprice => 10177559957753600000 |
150 |
} |
151 |
} |
152 |
); |
153 |
|
154 |
$t->get_ok( "//$userid:$password@/api/v1/acquisitions/orders/" . $order->ordernumber ) |
155 |
->json_is( '' => $order->to_api, 'Number representation should be consistent' ); |
156 |
|
140 |
$schema->storage->txn_rollback; |
157 |
$schema->storage->txn_rollback; |
141 |
}; |
158 |
}; |
142 |
|
159 |
|
143 |
- |
|
|