use with_settings instead of direct "Setting" at "test_index" of functional issues controller test
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8885 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
9599875f48
commit
f7618160ad
|
@ -55,20 +55,20 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_index
|
def test_index
|
||||||
Setting.default_language = 'en'
|
with_settings :default_language => "en" do
|
||||||
|
get :index
|
||||||
get :index
|
assert_response :success
|
||||||
assert_response :success
|
assert_template 'index'
|
||||||
assert_template 'index'
|
assert_not_nil assigns(:issues)
|
||||||
assert_not_nil assigns(:issues)
|
assert_nil assigns(:project)
|
||||||
assert_nil assigns(:project)
|
assert_tag :tag => 'a', :content => /Can't print recipes/
|
||||||
assert_tag :tag => 'a', :content => /Can't print recipes/
|
assert_tag :tag => 'a', :content => /Subproject issue/
|
||||||
assert_tag :tag => 'a', :content => /Subproject issue/
|
# private projects hidden
|
||||||
# private projects hidden
|
assert_no_tag :tag => 'a', :content => /Issue of a private subproject/
|
||||||
assert_no_tag :tag => 'a', :content => /Issue of a private subproject/
|
assert_no_tag :tag => 'a', :content => /Issue on project 2/
|
||||||
assert_no_tag :tag => 'a', :content => /Issue on project 2/
|
# project column
|
||||||
# project column
|
assert_tag :tag => 'th', :content => /Project/
|
||||||
assert_tag :tag => 'th', :content => /Project/
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_index_should_not_list_issues_when_module_disabled
|
def test_index_should_not_list_issues_when_module_disabled
|
||||||
|
|
Loading…
Reference in New Issue