|
Lines 108-121
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 => 3; |
| 112 |
|
|
|
| 113 |
$schema->storage->txn_begin; |
| 114 |
|
112 |
|
| 115 |
my $order = $builder->build_object( |
113 |
my $order = $builder->build_object( |
| 116 |
{ |
114 |
{ |
| 117 |
class => 'Koha::Acquisition::Orders', |
115 |
class => 'Koha::Acquisition::Orders', |
| 118 |
value => { orderstatus => 'new' } |
116 |
value => { |
|
|
117 |
orderstatus => 'new', |
| 118 |
ecost_tax_excluded => 9963405519357589504, |
| 119 |
unitprice => 10177559957753600000 |
| 120 |
} |
| 119 |
} |
121 |
} |
| 120 |
); |
122 |
); |
| 121 |
my $patron = $builder->build_object({ |
123 |
my $patron = $builder->build_object({ |
|
Lines 131-143
subtest 'get() tests' => sub {
Link Here
|
| 131 |
->json_is( '' => $order->to_api, 'SWAGGER3.3.2' ); |
133 |
->json_is( '' => $order->to_api, 'SWAGGER3.3.2' ); |
| 132 |
|
134 |
|
| 133 |
my $non_existent_order_id = $order->ordernumber; |
135 |
my $non_existent_order_id = $order->ordernumber; |
| 134 |
$order->delete; |
|
|
| 135 |
|
| 136 |
$t->get_ok( "//$userid:$password@/api/v1/acquisitions/orders/" . $non_existent_order_id ) |
| 137 |
->status_is(404) |
| 138 |
->json_is( '/error' => 'Order not found' ); |
| 139 |
|
| 140 |
$schema->storage->txn_rollback; |
| 141 |
}; |
136 |
}; |
| 142 |
|
137 |
|
| 143 |
subtest 'add() tests' => sub { |
138 |
subtest 'add() tests' => sub { |
| 144 |
- |
|
|