##// END OF EJS Templates
Include private_notes property in xml/json Journals output (#20985)....
Jean-Philippe Lang -
r15032:0e59482e90a7
parent child
Show More
@@ -59,6 +59,7 api.issue do
59 59 api.user(:id => journal.user_id, :name => journal.user.name) unless journal.user.nil?
60 60 api.notes journal.notes
61 61 api.created_on journal.created_on
62 api.private_notes journal.private_notes
62 63 api.array :details do
63 64 journal.visible_details.each do |detail|
64 65 api.detail :property => detail.property, :name => detail.prop_key do
@@ -169,10 +169,13 class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
169 169 end
170 170
171 171 test "GET /issues/:id.xml with journals" do
172 get '/issues/1.xml?include=journals'
172 Journal.find(2).update_attribute(:private_notes, true)
173
174 get '/issues/1.xml?include=journals', {}, credentials('jsmith')
173 175
174 176 assert_select 'issue journals[type=array]' do
175 177 assert_select 'journal[id="1"]' do
178 assert_select 'private_notes', :text => 'false'
176 179 assert_select 'details[type=array]' do
177 180 assert_select 'detail[name=status_id]' do
178 181 assert_select 'old_value', :text => '1'
@@ -180,6 +183,10 class Redmine::ApiTest::IssuesTest < Redmine::ApiTest::Base
180 183 end
181 184 end
182 185 end
186 assert_select 'journal[id="2"]' do
187 assert_select 'private_notes', :text => 'true'
188 assert_select 'details[type=array]'
189 end
183 190 end
184 191 end
185 192
General Comments 0
You need to be logged in to leave comments. Login now