|
Lines 1670-1676
subtest 'list() tests' => sub {
Link Here
|
| 1670 |
}; |
1670 |
}; |
| 1671 |
|
1671 |
|
| 1672 |
subtest 'add_item() tests' => sub { |
1672 |
subtest 'add_item() tests' => sub { |
| 1673 |
plan tests => 5; |
1673 |
plan tests => 7; |
| 1674 |
|
1674 |
|
| 1675 |
$schema->storage->txn_begin; |
1675 |
$schema->storage->txn_begin; |
| 1676 |
|
1676 |
|
|
Lines 1715-1719
subtest 'add_item() tests' => sub {
Link Here
|
| 1715 |
->status_is(201, 'Item created') |
1715 |
->status_is(201, 'Item created') |
| 1716 |
->json_is('/biblio_id', $biblio_id); |
1716 |
->json_is('/biblio_id', $biblio_id); |
| 1717 |
|
1717 |
|
|
|
1718 |
my $item = $builder->build_sample_item(); |
| 1719 |
|
| 1720 |
$t->post_ok("//$userid:$password@/api/v1/biblios/$biblio_id/items" => json => { |
| 1721 |
external_id => $item->barcode, |
| 1722 |
}) |
| 1723 |
->status_is(409, 'Duplicate barcode'); |
| 1724 |
|
| 1718 |
$schema->storage->txn_rollback; |
1725 |
$schema->storage->txn_rollback; |
| 1719 |
}; |
1726 |
}; |
| 1720 |
- |
|
|