mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 19:05:51 +01:00
Makes projects API return XML description when creating a project (#6874).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4397 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -52,12 +52,15 @@ class ApiTest::ProjectsTest < ActionController::IntegrationTest
|
||||
assert_difference 'Project.count' do
|
||||
post '/projects.xml', {:project => attributes}, :authorization => credentials('admin')
|
||||
end
|
||||
assert_response :created
|
||||
assert_equal 'application/xml', @response.content_type
|
||||
|
||||
project = Project.first(:order => 'id DESC')
|
||||
attributes.each do |attribute, value|
|
||||
assert_equal value, project.send(attribute)
|
||||
end
|
||||
|
||||
assert_response :created
|
||||
assert_equal 'application/xml', @response.content_type
|
||||
assert_tag 'project', :child => {:tag => 'id', :content => project.id.to_s}
|
||||
end
|
||||
|
||||
def test_create_failure
|
||||
|
||||
Reference in New Issue
Block a user