Lines 1690-1696
subtest 'list() tests' => sub {
Link Here
|
1690 |
}; |
1690 |
}; |
1691 |
|
1691 |
|
1692 |
subtest 'add_item() tests' => sub { |
1692 |
subtest 'add_item() tests' => sub { |
1693 |
plan tests => 5; |
1693 |
plan tests => 7; |
1694 |
|
1694 |
|
1695 |
$schema->storage->txn_begin; |
1695 |
$schema->storage->txn_begin; |
1696 |
|
1696 |
|
Lines 1735-1739
subtest 'add_item() tests' => sub {
Link Here
|
1735 |
->status_is(201, 'Item created') |
1735 |
->status_is(201, 'Item created') |
1736 |
->json_is('/biblio_id', $biblio_id); |
1736 |
->json_is('/biblio_id', $biblio_id); |
1737 |
|
1737 |
|
|
|
1738 |
my $item = $builder->build_sample_item(); |
1739 |
|
1740 |
$t->post_ok("//$userid:$password@/api/v1/biblios/$biblio_id/items" => json => { |
1741 |
external_id => $item->barcode, |
1742 |
}) |
1743 |
->status_is(409, 'Duplicate barcode'); |
1744 |
|
1738 |
$schema->storage->txn_rollback; |
1745 |
$schema->storage->txn_rollback; |
1739 |
}; |
1746 |
}; |
1740 |
- |
|
|