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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user