diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-11-02 07:22:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-11-02 07:22:45 +0000 |
commit | 501111708657d54eccefaa6d82b465d471b65ef9 (patch) | |
tree | c74c3f122bbe3bc791dac40d9e2c1c9df88e4dd4 /test/helpers | |
parent | f1f913afc655e66a2b5a4a7b42e1059b0d874ddb (diff) | |
download | redmine-501111708657d54eccefaa6d82b465d471b65ef9.tar.gz redmine-501111708657d54eccefaa6d82b465d471b65ef9.zip |
Fix CSV export of projects (#29482).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@18888 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/helpers')
-rw-r--r-- | test/helpers/projects_queries_helper_test.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test/helpers/projects_queries_helper_test.rb b/test/helpers/projects_queries_helper_test.rb new file mode 100644 index 000000000..e70471fe2 --- /dev/null +++ b/test/helpers/projects_queries_helper_test.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Redmine - project management software +# Copyright (C) 2006-2019 Jean-Philippe Lang +# +# This program 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 2 +# of the License, or (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +require File.expand_path('../../test_helper', __FILE__) + +class ProjectsQueriesHelperTest < Redmine::HelperTest + include ProjectsQueriesHelper + + fixtures :projects, :enabled_modules, + :custom_fields, :custom_values + + def test_csv_value + c_status = QueryColumn.new(:status) + c_parent_id = QueryColumn.new(:parent_id) + + assert_equal "active", csv_value(c_status, Project.find(1), 1) + assert_equal "eCookbook", csv_value(c_parent_id, Project.find(4), 1) + end +end |