From a8f231d57876c10d8c00306b4b43fed82457aa34 Mon Sep 17 00:00:00 2001 From: Olli-Antti Kivilahti Date: Fri, 17 Mar 2017 09:45:15 +0200 Subject: [PATCH] Bug 18293 - REST API tests. fix dateformat change regression in tests # got: '2017-03-27T00:00:00+03:00' # expected: '2017-03-27 00:00:00' Lax ISO8601 is not hip anymore. Now we roll wid dem big boyz! P.S. All datetimes in REST TESTS need fixing. --- t/db_dependent/api/v1/holds.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t index 843adb2..8ebd857 100644 --- a/t/db_dependent/api/v1/holds.t +++ b/t/db_dependent/api/v1/holds.t @@ -228,7 +228,7 @@ subtest "Test endpoints without permission, but accessing own object" => sub { $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_like('/suspend_until', qr/${suspend_until}T00:00:00\+\d\d:\d\d/) ->json_is('/priority', 2); }; @@ -256,7 +256,7 @@ subtest "Test endpoints with permission" => sub { $t->request_ok($tx) ->status_is(200) ->json_is('/reserve_id', $reserve_id) - ->json_is('/suspend_until', $suspend_until . ' 00:00:00') + ->json_like('/suspend_until', qr/${suspend_until}T00:00:00\+\d\d:\d\d/) ->json_is('/priority', 2); $tx = $t->ua->build_tx(DELETE => "/api/v1/holds/$reserve_id"); -- 2.7.4