Moves project attributes default assignments from ProjectsController#new to the model (#6064).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4460 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-12-03 16:15:16 +00:00
parent f6c633212a
commit 9284a32c9a
5 changed files with 58 additions and 7 deletions
@@ -103,6 +103,7 @@ class ApiTest::ProjectsTest < ActionController::IntegrationTest
context "POST /projects" do
context "with valid parameters" do
setup do
Setting.default_projects_modules = ['issue_tracking', 'repository']
@parameters = {:project => {:name => 'API test', :identifier => 'api-test'}}
end
@@ -121,6 +122,7 @@ class ApiTest::ProjectsTest < ActionController::IntegrationTest
project = Project.first(:order => 'id DESC')
assert_equal 'API test', project.name
assert_equal 'api-test', project.identifier
assert_equal ['issue_tracking', 'repository'], project.enabled_module_names
assert_response :created
assert_equal 'application/xml', @response.content_type