Bugzilla – Attachment 170511 Details for
Bug 37672
V1/RecordSources.pm should use more helpers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37672: Add tests
Bug-37672-Add-tests.patch (text/plain), 1.60 KB, created by
David Nind
on 2024-08-21 04:05:59 UTC
(
hide
)
Description:
Bug 37672: Add tests
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-08-21 04:05:59 UTC
Size:
1.60 KB
patch
obsolete
>From 3a00bff63e51ba5f9d07be68e1b9c0650e59f25e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 19 Aug 2024 09:55:06 -0300 >Subject: [PATCH] Bug 37672: Add tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/api/v1/record_sources.t | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/api/v1/record_sources.t b/t/db_dependent/api/v1/record_sources.t >index 09f3578375..0fb37a9091 100755 >--- a/t/db_dependent/api/v1/record_sources.t >+++ b/t/db_dependent/api/v1/record_sources.t >@@ -136,7 +136,7 @@ subtest 'get() tests' => sub { > > subtest 'delete() tests' => sub { > >- plan tests => 6; >+ plan tests => 10; > > $schema->storage->txn_begin; > >@@ -168,7 +168,15 @@ subtest 'delete() tests' => sub { > $patron->set_password( { password => $password, skip_validation => 1 } ); > $userid = $patron->userid; > >- $t->delete_ok("//$userid:$password@/api/v1/record_sources/$id")->status_is( 204, 'SWAGGER3.2.2' ); >+ $source->delete(); >+ $t->delete_ok("//$userid:$password@/api/v1/record_sources/$id")->status_is( 404, 'REST4.3' ) >+ ->json_is( { error => q{Record source not found}, error_code => q{not_found} } ); >+ >+ $source = $builder->build_object( { class => 'Koha::RecordSources' } ); >+ $id = $source->id; >+ >+ $t->delete_ok("//$userid:$password@/api/v1/record_sources/$id")->status_is( 204, 'REST3.2.4' ) >+ ->content_is( q{}, 'REST3.3.4' ); > > my $deleted_source = Koha::RecordSources->search( { record_source_id => $id } ); > >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37672
:
170465
|
170467
|
170510
|
170511
|
170569
|
170570