Bugzilla – Attachment 69751 Details for
Bug 18330
REST API: Date-time handling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18330: (follow-up) Adapt holds.t to match the new datetime format
Bug-18330-follow-up-Adapt-holdst-to-match-the-new-.patch (text/plain), 2.67 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-12-12 21:36:21 UTC
(
hide
)
Description:
Bug 18330: (follow-up) Adapt holds.t to match the new datetime format
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-12-12 21:36:21 UTC
Size:
2.67 KB
patch
obsolete
>From c36ea0a939f784a5391b845a74473a21456a6c92 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 12 Dec 2017 18:35:47 -0300 >Subject: [PATCH] Bug 18330: (follow-up) Adapt holds.t to match the new > datetime format > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/api/v1/holds.t | 33 +++++++++++++++++++++++---------- > 1 file changed, 23 insertions(+), 10 deletions(-) > >diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t >index 05603be894..8397f30a58 100644 >--- a/t/db_dependent/api/v1/holds.t >+++ b/t/db_dependent/api/v1/holds.t >@@ -28,6 +28,7 @@ use C4::Context; > use C4::Reserves; > > use Koha::Database; >+use Koha::DateUtils; > use Koha::Biblios; > use Koha::Biblioitems; > use Koha::Items; >@@ -219,11 +220,17 @@ subtest "Test endpoints without permission, but accessing own object" => sub { > my $reserve_id3 = Koha::Holds->find({ borrowernumber => $nopermission->{borrowernumber} })->reserve_id; > $tx = $t->ua->build_tx(PUT => "/api/v1/holds/$reserve_id3" => json => $put_data); > $tx->req->cookies({name => 'CGISESSID', value => $session_nopermission->id}); >- $t->request_ok($tx) # create hold to myself >- ->status_is(200) >- ->json_is('/reserve_id', $reserve_id3) >- ->json_is('/suspend_until', $suspend_until . ' 00:00:00') >- ->json_is('/priority', 2); >+ $t->request_ok($tx) # create hold to myself >+ ->status_is(200)->json_is( '/reserve_id', $reserve_id3 )->json_is( >+ '/suspend_until', >+ output_pref( >+ { >+ dateformat => 'rfc3339', >+ dt => dt_from_string( $suspend_until . ' 00:00:00', 'sql' ) >+ } >+ ) >+ ) >+ ->json_is( '/priority', 2 ); > }; > > subtest "Test endpoints with permission" => sub { >@@ -247,11 +254,17 @@ subtest "Test endpoints with permission" => sub { > > $tx = $t->ua->build_tx(PUT => "/api/v1/holds/$reserve_id" => json => $put_data); > $tx->req->cookies({name => 'CGISESSID', value => $session3->id}); >- $t->request_ok($tx) >- ->status_is(200) >- ->json_is('/reserve_id', $reserve_id) >- ->json_is('/suspend_until', $suspend_until . ' 00:00:00') >- ->json_is('/priority', 2); >+ $t->request_ok($tx)->status_is(200)->json_is( '/reserve_id', $reserve_id ) >+ ->json_is( >+ '/suspend_until', >+ output_pref( >+ { >+ dateformat => 'rfc3339', >+ dt => dt_from_string( $suspend_until . ' 00:00:00', 'sql' ) >+ } >+ ) >+ ) >+ ->json_is( '/priority', 2 ); > > $tx = $t->ua->build_tx(DELETE => "/api/v1/holds/$reserve_id"); > $tx->req->cookies({name => 'CGISESSID', value => $session3->id}); >-- >2.15.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 18330
:
63603
|
63604
|
63605
|
69726
|
69727
|
69749
|
69750
| 69751 |
69851