summaryrefslogtreecommitdiffstats
path: root/test/functional/projects_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-06 20:36:31 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-06 20:36:31 +0000
commit9fb770ba503b3dfe1fe48794e1b7042c5e26d8d7 (patch)
tree7a7975f365ca85a2472811908a3292f5a8d1a9a7 /test/functional/projects_controller_test.rb
parent7620142b7015860e11afb696f67877f03323a8a0 (diff)
downloadredmine-9fb770ba503b3dfe1fe48794e1b7042c5e26d8d7.tar.gz
redmine-9fb770ba503b3dfe1fe48794e1b7042c5e26d8d7.zip
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
Diffstat (limited to 'test/functional/projects_controller_test.rb')
-rw-r--r--test/functional/projects_controller_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index aaf6e3085..d3a12f290 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -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)