summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-10 10:12:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-10 10:12:19 +0000
commit0e19aa4362a0524d900044fc9dc69e177337eca0 (patch)
treed5b9120bfab84d78beb68cb38ab6d2b8a462c3df /test/integration
parent8524d505c5c092ead4f6be1fedfc38311b3c7b91 (diff)
downloadredmine-0e19aa4362a0524d900044fc9dc69e177337eca0.tar.gz
redmine-0e19aa4362a0524d900044fc9dc69e177337eca0.zip
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
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/api_test/issues_test.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb
index 0ef9de8e2..c57b51eea 100644
--- a/test/integration/api_test/issues_test.rb
+++ b/test/integration/api_test/issues_test.rb
@@ -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)