|
Lines 136-142
subtest 'get() tests' => sub {
Link Here
|
| 136 |
|
136 |
|
| 137 |
subtest 'delete() tests' => sub { |
137 |
subtest 'delete() tests' => sub { |
| 138 |
|
138 |
|
| 139 |
plan tests => 10; |
139 |
plan tests => 12; |
| 140 |
|
140 |
|
| 141 |
$schema->storage->txn_begin; |
141 |
$schema->storage->txn_begin; |
| 142 |
|
142 |
|
|
Lines 175-180
subtest 'delete() tests' => sub {
Link Here
|
| 175 |
$source = $builder->build_object( { class => 'Koha::RecordSources' } ); |
175 |
$source = $builder->build_object( { class => 'Koha::RecordSources' } ); |
| 176 |
$id = $source->id; |
176 |
$id = $source->id; |
| 177 |
|
177 |
|
|
|
178 |
my $biblio = $builder->build_sample_biblio(); |
| 179 |
my $metadata = $biblio->metadata; |
| 180 |
$metadata->record_source_id( $source->id )->store(); |
| 181 |
|
| 182 |
$t->delete_ok("//$userid:$password@/api/v1/record_sources/$id")->status_is( 409, 'REST3.2.4.1' ); |
| 183 |
|
| 184 |
$biblio->delete(); |
| 185 |
|
| 178 |
$t->delete_ok("//$userid:$password@/api/v1/record_sources/$id")->status_is( 204, 'REST3.2.4' ) |
186 |
$t->delete_ok("//$userid:$password@/api/v1/record_sources/$id")->status_is( 204, 'REST3.2.4' ) |
| 179 |
->content_is( q{}, 'REST3.3.4' ); |
187 |
->content_is( q{}, 'REST3.3.4' ); |
| 180 |
|
188 |
|
| 181 |
- |
|
|