Revision 13317
Added by Jean-Philippe Lang almost 11 years ago
sandbox/rails-4.1/test/integration/api_test/projects_test.rb | ||
---|---|---|
131 | 131 |
end |
132 | 132 |
|
133 | 133 |
test "POST /projects.xml with valid parameters should create the project" do |
134 |
Setting.default_projects_modules = ['issue_tracking', 'repository']
|
|
135 |
|
|
136 |
assert_difference('Project.count') do
|
|
137 |
post '/projects.xml',
|
|
138 |
{:project => {:name => 'API test', :identifier => 'api-test'}},
|
|
139 |
credentials('admin')
|
|
134 |
with_settings :default_projects_modules => ['issue_tracking', 'repository'] do
|
|
135 |
assert_difference('Project.count') do |
|
136 |
post '/projects.xml',
|
|
137 |
{:project => {:name => 'API test', :identifier => 'api-test'}},
|
|
138 |
credentials('admin')
|
|
139 |
end
|
|
140 | 140 |
end |
141 | 141 |
|
142 | 142 |
project = Project.order('id DESC').first |
Also available in: Unified diff
Don't change default_projects_modules setting for the other tests.