]> source.dussan.org Git - redmine.git/commitdiff
fix random test failure of ProjectQueryTest (#29482)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 15:35:27 +0000 (15:35 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 22 Oct 2019 15:35:27 +0000 (15:35 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18827 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/project_query_test.rb

index e2d151d06c11f7004c3656a98946f81a9d87b673..3afafa2a95b1fa57990fd2223d0f41208899ca96 100644 (file)
@@ -27,6 +27,8 @@ class ProjectQueryTest < ActiveSupport::TestCase
            :enabled_modules,
            :custom_fields, :custom_values
 
+  include Redmine::I18n
+
   def test_filter_values_be_arrays
     q = ProjectQuery.new
     assert_nil q.project
@@ -39,9 +41,9 @@ class ProjectQueryTest < ActiveSupport::TestCase
   end
 
   def test_project_statuses_filter_should_return_project_statuses
+    set_language_if_valid 'en'
     query = ProjectQuery.new(:name => '_')
     query.filters = {'status' => {:operator => '=', :values => []}}
-
     values = query.available_filters['status'][:values]
     assert_equal ['active', 'closed'], values.map(&:first)
     assert_equal ['1', '5'], values.map(&:second)