Bugzilla – Attachment 162203 Details for
Bug 36100
Regression in bookings edit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36100: Update unit tests for add
Bug-36100-Update-unit-tests-for-add.patch (text/plain), 1.85 KB, created by
Martin Renvoize (ashimema)
on 2024-02-15 12:34:35 UTC
(
hide
)
Description:
Bug 36100: Update unit tests for add
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-02-15 12:34:35 UTC
Size:
1.85 KB
patch
obsolete
>From 412432e485959b960cce5b43c35dcb88fcf3bae6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 15 Feb 2024 12:33:26 +0000 >Subject: [PATCH] Bug 36100: Update unit tests for add > >This patch updates the unit tests for booking add to confirm that >without readOnly we still return an error should a user attempt to >submit a booking with a booking_id that would clash. >--- > t/db_dependent/api/v1/bookings.t | 13 ++++--------- > 1 file changed, 4 insertions(+), 9 deletions(-) > >diff --git a/t/db_dependent/api/v1/bookings.t b/t/db_dependent/api/v1/bookings.t >index 27595afaebb..14a4396f46b 100755 >--- a/t/db_dependent/api/v1/bookings.t >+++ b/t/db_dependent/api/v1/bookings.t >@@ -224,7 +224,8 @@ subtest 'add() tests' => sub { > my $unauth_userid = $patron->userid; > > my $biblio = $builder->build_sample_biblio; >- my $item = $builder->build_sample_item( { bookable => 1, biblionumber => $biblio->id } ); >+ my $item1 = $builder->build_sample_item( { bookable => 1, biblionumber => $biblio->id } ); >+ my $item2 = $builder->build_sample_item( { bookable => 1, biblionumber => $biblio->id } ); > my $booking = { > biblio_id => $biblio->id, > item_id => undef, >@@ -261,14 +262,8 @@ subtest 'add() tests' => sub { > > # Authorized attempt to create with existing id > $booking->{booking_id} = $booking_id; >- $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking )->status_is(400)->json_is( >- "/errors" => [ >- { >- message => "Read-only.", >- path => "/body/booking_id" >- } >- ] >- ); >+ $t->post_ok( "//$userid:$password@/api/v1/bookings" => json => $booking )->status_is(400) >+ ->json_is( "/error" => "Duplicate booking_id" ); > > # TODO: Test bookings clashes > # TODO: Test item auto-assignment >-- >2.43.1
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 36100
:
162192
|
162202
|
162203
|
162229
|
162230
|
162633
|
162634
|
162635
|
162636
|
162637
|
162638