From f2c2d6781b6f7a440d5c98dccef5b8af742024a1 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 1 Aug 2022 12:28:20 +0000 Subject: [PATCH] Bug 29579: (QA follow-up) Fix up t/db_dependent/Koha/Reports.t Signed-off-by: Jonathan Druart --- t/db_dependent/Koha/Reports.t | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Koha/Reports.t b/t/db_dependent/Koha/Reports.t index e580c12d5db..2b0e6300399 100755 --- a/t/db_dependent/Koha/Reports.t +++ b/t/db_dependent/Koha/Reports.t @@ -55,17 +55,18 @@ subtest 'prep_report' => sub { report_name => 'report_name_for_test_1', savedsql => 'SELECT * FROM items WHERE itemnumber IN <>', })->store; + my $id = $report->id; my ($sql, undef) = $report->prep_report( ['Test|list'],["1\n12\n\r243"] ); - is( $sql, q{SELECT * FROM items WHERE itemnumber IN ('1','12','243')},'Expected sql generated correctly with single param and name'); + is( $sql, qq{SELECT * FROM items WHERE itemnumber IN ('1','12','243') /* saved_sql.id: $id */},'Expected sql generated correctly with single param and name'); $report->savedsql('SELECT * FROM items WHERE itemnumber IN <> AND <> AND <>')->store; ($sql, undef) = $report->prep_report( ['Test|list','Another'],["1\n12\n\r243",'the other'] ); - is( $sql, q{SELECT * FROM items WHERE itemnumber IN ('1','12','243') AND 'the other' AND ('1','12','243')},'Expected sql generated correctly with multiple params and names'); + is( $sql, qq{SELECT * FROM items WHERE itemnumber IN ('1','12','243') AND 'the other' AND ('1','12','243') /* saved_sql.id: $id */},'Expected sql generated correctly with multiple params and names'); ($sql, undef) = $report->prep_report( [],["1\n12\n\r243",'the other',"42\n32\n22\n12"] ); - is( $sql, q{SELECT * FROM items WHERE itemnumber IN ('1','12','243') AND 'the other' AND ('42','32','22','12')},'Expected sql generated correctly with multiple params and no names'); + 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'); }; -- 2.25.1