From b25cb7ab0f3ff892a273d4d8300483afee414fa3 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 3 Nov 2017 10:19:57 +0100 Subject: [PATCH] Bug 19420: (QA Follow-up) Fix test, correct POD The test needs the code level in the error hash now. And POD is adjusted accordingly. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- Koha/Uploader.pm | 2 +- t/db_dependent/Upload.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/Uploader.pm b/Koha/Uploader.pm index 7a02d117be..8e6a2aa36f 100644 --- a/Koha/Uploader.pm +++ b/Koha/Uploader.pm @@ -143,7 +143,7 @@ sub result { =head2 err - Returns hash with errors in format { file => err, ... } + Returns hashref with errors in format { file => { code => err }, ... } Undefined if there are no errors. =cut diff --git a/t/db_dependent/Upload.t b/t/db_dependent/Upload.t index 8d773628f2..41b3fff2c5 100644 --- a/t/db_dependent/Upload.t +++ b/t/db_dependent/Upload.t @@ -145,7 +145,7 @@ subtest 'Add same file in same category' => sub { is( $upl->count, 0, 'Upload 4 failed as expected' ); is( $upl->result, undef, 'Result is undefined' ); my $e = $upl->err; - is( $e->{file2}, 1, "Errcode 1 [already exists] reported" ); + is( $e->{file2}->{code}, 1, "Errcode 1 [already exists] reported" ); }; subtest 'Test delete via UploadedFile as well as UploadedFiles' => sub { -- 2.39.5