Fixed: error when serializing back objects with custom fields using ActiveResource (#6403).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4480 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-12-10 10:12:19 +00:00
parent 8524d505c5
commit 0e19aa4362
8 changed files with 45 additions and 30 deletions
+26
View File
@@ -91,6 +91,32 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest
end
context "GET /issues/:id" do
context "with custom fields" do
context ".xml" do
should "display custom fields" do
get '/issues/3.xml'
assert_tag :tag => 'issue',
:child => {
:tag => 'custom_fields',
:attributes => { :type => 'array' },
:child => {
:tag => 'custom_field',
:attributes => { :id => '1'},
:child => {
:tag => 'value',
:content => 'MySQL'
}
}
}
assert_nothing_raised do
Hash.from_xml(response.body).to_xml
end
end
end
end
context "with subtasks" do
setup do
@c1 = Issue.generate!(:status_id => 1, :subject => "child c1", :tracker_id => 1, :project_id => 1, :parent_issue_id => 1)