View | Details | Raw Unified | Return to bug 37672
Collapse All | Expand All

(-)a/t/db_dependent/api/v1/record_sources.t (-3 / +10 lines)
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 => 6;
139
    plan tests => 10;
140
140
141
    $schema->storage->txn_begin;
141
    $schema->storage->txn_begin;
142
142
Lines 168-174 subtest 'delete() tests' => sub { Link Here
168
    $patron->set_password( { password => $password, skip_validation => 1 } );
168
    $patron->set_password( { password => $password, skip_validation => 1 } );
169
    $userid = $patron->userid;
169
    $userid = $patron->userid;
170
170
171
    $t->delete_ok("//$userid:$password@/api/v1/record_sources/$id")->status_is( 204, 'SWAGGER3.2.2' );
171
    $source->delete();
172
    $t->delete_ok("//$userid:$password@/api/v1/record_sources/$id")->status_is( 404, 'REST4.3' )
173
        ->json_is( { error => q{Record source not found}, error_code => q{not_found} } );
174
175
    $source = $builder->build_object( { class => 'Koha::RecordSources' } );
176
    $id     = $source->id;
177
178
    $t->delete_ok("//$userid:$password@/api/v1/record_sources/$id")->status_is( 204, 'REST3.2.4' )
179
        ->content_is( q{}, 'REST3.3.4' );
172
180
173
    my $deleted_source = Koha::RecordSources->search( { record_source_id => $id } );
181
    my $deleted_source = Koha::RecordSources->search( { record_source_id => $id } );
174
182
175
- 

Return to bug 37672