Lines 715-721
subtest 'set_rating() tests' => sub {
Link Here
|
715 |
}; |
715 |
}; |
716 |
|
716 |
|
717 |
subtest 'add_item() tests' => sub { |
717 |
subtest 'add_item() tests' => sub { |
718 |
plan tests => 5; |
718 |
plan tests => 7; |
719 |
|
719 |
|
720 |
$schema->storage->txn_begin; |
720 |
$schema->storage->txn_begin; |
721 |
|
721 |
|
Lines 760-764
subtest 'add_item() tests' => sub {
Link Here
|
760 |
->status_is(201, 'Item created') |
760 |
->status_is(201, 'Item created') |
761 |
->json_is('/biblio_id', $biblio_id); |
761 |
->json_is('/biblio_id', $biblio_id); |
762 |
|
762 |
|
|
|
763 |
my $item = $builder->build_sample_item(); |
764 |
|
765 |
$t->post_ok("//$userid:$password@/api/v1/biblios/$biblio_id/items" => json => { |
766 |
external_id => $item->barcode, |
767 |
}) |
768 |
->status_is(409, 'Duplicate barcode'); |
769 |
|
763 |
$schema->storage->txn_rollback; |
770 |
$schema->storage->txn_rollback; |
764 |
}; |
771 |
}; |
765 |
- |
|
|