Bugzilla – Attachment 153064 Details for
Bug 27824
Report batch operations break with space in placeholder
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27824: Add a test
Bug-27824-Add-a-test.patch (text/plain), 1.51 KB, created by
Owen Leonard
on 2023-07-05 15:49:27 UTC
(
hide
)
Description:
Bug 27824: Add a test
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-07-05 15:49:27 UTC
Size:
1.51 KB
patch
obsolete
>From e692b6ff60498dbed054a85ae853c453a13aad7c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 5 Jul 2023 15:44:32 +0200 >Subject: [PATCH] Bug 27824: Add a test > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > t/db_dependent/Koha/Reports.t | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Reports.t b/t/db_dependent/Koha/Reports.t >index 2b0e630039..94c68e1732 100755 >--- a/t/db_dependent/Koha/Reports.t >+++ b/t/db_dependent/Koha/Reports.t >@@ -49,7 +49,7 @@ $retrieved_report_1->delete; > is( Koha::Reports->search->count, $nb_of_reports + 1, 'Delete should have deleted the report' ); > > subtest 'prep_report' => sub { >- plan tests => 3; >+ plan tests => 4; > > my $report = Koha::Report->new({ > report_name => 'report_name_for_test_1', >@@ -68,6 +68,10 @@ subtest 'prep_report' => sub { > ($sql, undef) = $report->prep_report( [],["1\n12\n\r243",'the other',"42\n32\n22\n12"] ); > is( $sql, qq{SELECT * FROM items WHERE itemnumber IN ('1','12','243') AND 'the other' AND ('42','32','22','12') /* saved_sql.id: $id */},'Expected sql generated correctly with multiple params and no names'); > >+ $report->savedsql(q{SELECT i.itemnumber, i.itemnumber as Exemplarnummber, [[i.itemnumber| itemnumber for batch]] FROM items})->store; >+ my $headers; >+ ( $sql, $headers ) = $report->prep_report( [], [] ); >+ is_deeply( $headers, { 'itemnumber for batch' => 'itemnumber' } ); > }; > > $schema->storage->txn_rollback; >-- >2.30.2
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 27824
:
153059
|
153060
|
153064
|
153065
|
153220
|
153221