##// END OF EJS Templates
Changes the representation of journal details in issue API....
Jean-Philippe Lang -
r4369:ab6a93b029b2
parent child
Show More
@@ -50,7 +50,10 api.issue do
50 api.notes journal.notes
50 api.notes journal.notes
51 api.array :details do
51 api.array :details do
52 journal.details.each do |detail|
52 journal.details.each do |detail|
53 api.detail :property => detail.property, :name => detail.prop_key, :old => detail.old_value, :new => detail.value
53 api.detail :property => detail.property, :name => detail.prop_key do
54 api.old_value detail.old_value
55 api.new_value detail.value
56 end
54 end
57 end
55 end
58 end
56 end
59 end
@@ -91,6 +91,40 class ApiTest::IssuesTest < ActionController::IntegrationTest
91 end
91 end
92
92
93 context "GET /issues/:id" do
93 context "GET /issues/:id" do
94 context "with journals" do
95 context ".xml" do
96 should "display journals" do
97 get '/issues/1.xml'
98
99 assert_tag :tag => 'issue',
100 :child => {
101 :tag => 'journals',
102 :attributes => { :type => 'array' },
103 :child => {
104 :tag => 'journal',
105 :attributes => { :id => '1'},
106 :child => {
107 :tag => 'details',
108 :attributes => { :type => 'array' },
109 :child => {
110 :tag => 'detail',
111 :attributes => { :name => 'status_id' },
112 :child => {
113 :tag => 'old_value',
114 :content => '1',
115 :sibling => {
116 :tag => 'new_value',
117 :content => '2'
118 }
119 }
120 }
121 }
122 }
123 }
124 end
125 end
126 end
127
94 context "with custom fields" do
128 context "with custom fields" do
95 context ".xml" do
129 context ".xml" do
96 should "display custom fields" do
130 should "display custom fields" do
General Comments 0
You need to be logged in to leave comments. Login now