Browse Source

use with_settings at IssuesControllerTest#test_index_with_project_and_subprojects_should_show_private_subprojects_with_permission

git-svn-id: http://svn.redmine.org/redmine/trunk@20216 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.2.0
Toshi MARUYAMA 3 years ago
parent
commit
ffaa46fea1
1 changed files with 7 additions and 6 deletions
  1. 7
    6
      test/functional/issues_controller_test.rb

+ 7
- 6
test/functional/issues_controller_test.rb View File

@@ -121,13 +121,14 @@ class IssuesControllerTest < Redmine::ControllerTest

def test_index_with_project_and_subprojects_should_show_private_subprojects_with_permission
@request.session[:user_id] = 2
Setting.display_subprojects_issues = 1
get(:index, :params => {:project_id => 1})
assert_response :success
with_settings :display_subprojects_issues => '1' do
get(:index, :params => {:project_id => 1})
assert_response :success

assert_select 'a[href="/issues/1"]', :text => /Cannot print recipes/
assert_select 'a[href="/issues/5"]', :text => /Subproject issue/
assert_select 'a[href="/issues/6"]', :text => /Issue of a private subproject/
assert_select 'a[href="/issues/1"]', :text => /Cannot print recipes/
assert_select 'a[href="/issues/5"]', :text => /Subproject issue/
assert_select 'a[href="/issues/6"]', :text => /Issue of a private subproject/
end
end

def test_index_with_project_and_default_filter

Loading…
Cancel
Save