Bugzilla – Attachment 173705 Details for
Bug 38273
Koha::Object->discard_changes should return the Koha::Object for chaining
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38273: Adjust t/db_dependent/api/v1/holds.t
Bug-38273-Adjust-tdbdependentapiv1holdst.patch (text/plain), 3.97 KB, created by
Pedro Amorim
on 2024-10-30 09:20:02 UTC
(
hide
)
Description:
Bug 38273: Adjust t/db_dependent/api/v1/holds.t
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-10-30 09:20:02 UTC
Size:
3.97 KB
patch
obsolete
>From a09d185f0159e3e407295d165b62a8783fe470cf Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 30 Oct 2024 09:20:04 +0000 >Subject: [PATCH] Bug 38273: Adjust t/db_dependent/api/v1/holds.t > >--- > t/db_dependent/api/v1/holds.t | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t >index 7562509894..f742f17ab0 100755 >--- a/t/db_dependent/api/v1/holds.t >+++ b/t/db_dependent/api/v1/holds.t >@@ -1374,7 +1374,7 @@ subtest 'PUT /holds/{hold_id}/pickup_location tests' => sub { > ->status_is(200) > ->json_is({ pickup_library_id => $library_2->branchcode }); > >- is( $hold->discard_changes->branchcode->branchcode, $library_2->branchcode, 'pickup library adjusted correctly' ); >+ is( $hold->discard_changes->branchcode, $library_2->branchcode, 'pickup library adjusted correctly' ); > > $t->put_ok( "//$userid:$password@/api/v1/holds/" > . $hold->id >@@ -1382,7 +1382,7 @@ subtest 'PUT /holds/{hold_id}/pickup_location tests' => sub { > ->status_is(400) > ->json_is({ error => '[The supplied pickup location is not valid]' }); > >- is( $hold->discard_changes->branchcode->branchcode, $library_2->branchcode, 'pickup library unchanged' ); >+ is( $hold->discard_changes->branchcode, $library_2->branchcode, 'pickup library unchanged' ); > > # item-level hold > $hold = Koha::Holds->find( >@@ -1404,7 +1404,7 @@ subtest 'PUT /holds/{hold_id}/pickup_location tests' => sub { > ->status_is(400) > ->json_is({ error => '[The supplied pickup location is not valid]' }); > >- is( $hold->discard_changes->branchcode->branchcode, $library_1->branchcode, 'pickup library unchanged' ); >+ is( $hold->discard_changes->branchcode, $library_1->branchcode, 'pickup library unchanged' ); > > t::lib::Mocks::mock_preference( 'AllowHoldPolicyOverride', 1 ); > >@@ -1417,7 +1417,7 @@ subtest 'PUT /holds/{hold_id}/pickup_location tests' => sub { > ->status_is(200) > ->json_is({ pickup_library_id => $library_2->branchcode }); > >- is( $hold->discard_changes->branchcode->branchcode, $library_2->branchcode, 'pickup library changed' ); >+ is( $hold->discard_changes->branchcode, $library_2->branchcode, 'pickup library changed' ); > > t::lib::Mocks::mock_preference( 'AllowHoldPolicyOverride', 0 ); > >@@ -1427,7 +1427,7 @@ subtest 'PUT /holds/{hold_id}/pickup_location tests' => sub { > ->status_is(200) > ->json_is({ pickup_library_id => $library_2->branchcode }); > >- is( $hold->discard_changes->branchcode->branchcode, $library_2->branchcode, 'pickup library adjusted correctly' ); >+ is( $hold->discard_changes->branchcode, $library_2->branchcode, 'pickup library adjusted correctly' ); > > $t->put_ok( "//$userid:$password@/api/v1/holds/" > . $hold->id >@@ -1435,7 +1435,7 @@ subtest 'PUT /holds/{hold_id}/pickup_location tests' => sub { > ->status_is(400) > ->json_is({ error => '[The supplied pickup location is not valid]' }); > >- is( $hold->discard_changes->branchcode->branchcode, $library_2->branchcode, 'invalid pickup library not used' ); >+ is( $hold->discard_changes->branchcode, $library_2->branchcode, 'invalid pickup library not used' ); > > $t->put_ok( "//$userid:$password@/api/v1/holds/" > . $hold->id >@@ -1445,7 +1445,7 @@ subtest 'PUT /holds/{hold_id}/pickup_location tests' => sub { > ->status_is(400) > ->json_is({ error => '[The supplied pickup location is not valid]' }); > >- is( $hold->discard_changes->branchcode->branchcode, $library_2->branchcode, 'invalid pickup library not used, even if x-koha-override is passed' ); >+ is( $hold->discard_changes->branchcode, $library_2->branchcode, 'invalid pickup library not used, even if x-koha-override is passed' ); > > my $waiting_hold = $builder->build_object( { class => 'Koha::Holds', value => { found => 'W' } } ); > my $in_processing_hold = $builder->build_object( { class => 'Koha::Holds', value => { found => 'P' } } ); >-- >2.39.5
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 38273
:
173507
|
173528
|
173529
|
173538
|
173539
| 173705