Commit e76e7818 authored by tmaruyama's avatar tmaruyama

use with_settings instead of direct "Setting" at "test_index" of functional issues controller test

git-svn-id: https://svn.redmine.org/redmine/trunk@8885 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 4b874e7c
......@@ -55,20 +55,20 @@ class IssuesControllerTest < ActionController::TestCase
end
def test_index
Setting.default_language = 'en'
get :index
assert_response :success
assert_template 'index'
assert_not_nil assigns(:issues)
assert_nil assigns(:project)
assert_tag :tag => 'a', :content => /Can't print recipes/
assert_tag :tag => 'a', :content => /Subproject issue/
# private projects hidden
assert_no_tag :tag => 'a', :content => /Issue of a private subproject/
assert_no_tag :tag => 'a', :content => /Issue on project 2/
# project column
assert_tag :tag => 'th', :content => /Project/
with_settings :default_language => "en" do
get :index
assert_response :success
assert_template 'index'
assert_not_nil assigns(:issues)
assert_nil assigns(:project)
assert_tag :tag => 'a', :content => /Can't print recipes/
assert_tag :tag => 'a', :content => /Subproject issue/
# private projects hidden
assert_no_tag :tag => 'a', :content => /Issue of a private subproject/
assert_no_tag :tag => 'a', :content => /Issue on project 2/
# project column
assert_tag :tag => 'th', :content => /Project/
end
end
def test_index_should_not_list_issues_when_module_disabled
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment