From e1bf0bdbb72589ca586c6a98a8f31f1c9fc12bbc 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 Content-Type: text/plain; charset=utf-8 The test needs the code level in the error hash now. And POD is adjusted accordingly. --- 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 7a02d11..8e6a2aa 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 8d77362..41b3fff 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.1.4