From ab2141553103c3855443fd8df941dc5f8202f14b Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Sun, 24 Aug 2014 02:21:52 -0300 Subject: [PATCH] Bug 11672: (regression test) get_report_areas gets tested This patch introduces a unit test for the new get_report_areas functionality. To try it, run $ prove t/db_dependent/Reports_Guided.t It is expected to have 16 tests defined, and to fail the introduced one Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart --- t/db_dependent/Reports_Guided.t | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Reports_Guided.t b/t/db_dependent/Reports_Guided.t index 6633c2f..4e2041a5 100755 --- a/t/db_dependent/Reports_Guided.t +++ b/t/db_dependent/Reports_Guided.t @@ -1,11 +1,23 @@ #!/usr/bin/perl + +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # -# This Koha test module is a stub! -# Add more tests here!!! +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . use Modern::Perl; -use Test::More tests => 15; +use Test::More tests => 16; use C4::Context; @@ -98,6 +110,9 @@ ok( 'attempting to run a report with an SQL syntax error returns error message (Bug 12214)' ); +is_deeply( get_report_areas(), [ 'CIRC', 'CAT', 'PAT', 'ACQ', 'ACC' ], + "get_report_areas returns the correct array of report areas"); + #End transaction $dbh->rollback; -- 2.1.0