mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 20:36:53 +02:00
Moves enabled_module_names param to project attribute so that it can be set through the Project API.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4645 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -154,7 +154,8 @@ class ProjectsControllerTest < ActionController::TestCase
|
||||
:custom_field_values => { '3' => 'Beta' },
|
||||
:tracker_ids => ['1', '3'],
|
||||
# an issue custom field that is not for all project
|
||||
:issue_custom_field_ids => ['9']
|
||||
:issue_custom_field_ids => ['9'],
|
||||
:enabled_module_names => ['issue_tracking', 'news', 'repository']
|
||||
}
|
||||
assert_redirected_to '/projects/blog/settings'
|
||||
|
||||
@@ -167,6 +168,7 @@ class ProjectsControllerTest < ActionController::TestCase
|
||||
assert_nil project.parent
|
||||
assert_equal 'Beta', project.custom_value_for(3).value
|
||||
assert_equal [1, 3], project.trackers.map(&:id).sort
|
||||
assert_equal ['issue_tracking', 'news', 'repository'], project.enabled_module_names.sort
|
||||
assert project.issue_custom_fields.include?(IssueCustomField.find(9))
|
||||
end
|
||||
|
||||
@@ -197,7 +199,9 @@ class ProjectsControllerTest < ActionController::TestCase
|
||||
:description => "weblog",
|
||||
:identifier => "blog",
|
||||
:is_public => 1,
|
||||
:custom_field_values => { '3' => 'Beta' }
|
||||
:custom_field_values => { '3' => 'Beta' },
|
||||
:tracker_ids => ['1', '3'],
|
||||
:enabled_module_names => ['issue_tracking', 'news', 'repository']
|
||||
}
|
||||
|
||||
assert_redirected_to '/projects/blog/settings'
|
||||
@@ -206,6 +210,8 @@ class ProjectsControllerTest < ActionController::TestCase
|
||||
assert_kind_of Project, project
|
||||
assert_equal 'weblog', project.description
|
||||
assert_equal true, project.is_public?
|
||||
assert_equal [1, 3], project.trackers.map(&:id).sort
|
||||
assert_equal ['issue_tracking', 'news', 'repository'], project.enabled_module_names.sort
|
||||
|
||||
# User should be added as a project member
|
||||
assert User.find(9).member_of?(project)
|
||||
|
||||
Reference in New Issue
Block a user