From: Jean-Philippe Lang Date: Sat, 9 Nov 2013 07:42:54 +0000 (+0000) Subject: Wiki Pages REST API with version returns wrong comments (#15235). X-Git-Tag: 2.4.0~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=71b43ea1c7c1ee9c854bb09bc059cd3a60ca1ddc;p=redmine.git Wiki Pages REST API with version returns wrong comments (#15235). Patch by Yukinari TOYOTA. git-svn-id: http://svn.redmine.org/redmine/trunk@12245 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/wiki/show.api.rsb b/app/views/wiki/show.api.rsb index c35316104..8e082e123 100644 --- a/app/views/wiki/show.api.rsb +++ b/app/views/wiki/show.api.rsb @@ -6,7 +6,7 @@ api.wiki_page do api.text @content.text api.version @content.version api.author(:id => @content.author_id, :name => @content.author.name) - api.comments @page.content.comments + api.comments @content.comments api.created_on @page.created_on api.updated_on @content.updated_on diff --git a/test/integration/api_test/wiki_pages_test.rb b/test/integration/api_test/wiki_pages_test.rb index 02c764fa7..d299911a6 100644 --- a/test/integration/api_test/wiki_pages_test.rb +++ b/test/integration/api_test/wiki_pages_test.rb @@ -90,6 +90,7 @@ class Redmine::ApiTest::WikiPagesTest < Redmine::ApiTest::Base assert_select 'version', :text => '2' assert_select 'text' assert_select 'author' + assert_select 'comments', :text => 'Small update' assert_select 'created_on' assert_select 'updated_on' end