From a96b00ca7e33991d81c53e964672d8d33f9f3ab4 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Tue, 1 Mar 2022 21:04:13 -1000 Subject: [PATCH] Bug 29857: (QA follow-up) Fix unit test Object.t Unit test failling with : # Failed test 'Exception message correct' # at /kohadevbox/koha/t/db_dependent/Koha/Object.t line 335. # got: 'Exception 'Koha::Exception' thrown 'Asked to embed items but its return value doesn't implement to_api' # ' # expected: 'Asked to embed items but its return value doesn't implement to_api' # Looks like you failed 1 test of 29. Fixed by using $@->message like in other places. prove t/db_dependent/Koha/Object.t --- t/db_dependent/Koha/Object.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t index f692c183ff..10c94c38e3 100755 --- a/t/db_dependent/Koha/Object.t +++ b/t/db_dependent/Koha/Object.t @@ -333,7 +333,7 @@ subtest "to_api() tests" => sub { "An exception is thrown if a blessed object to embed doesn't implement to_api"; is( - "$@", + $@->message, "Asked to embed items but its return value doesn't implement to_api", "Exception message correct" ); -- 2.35.1