From f86acb6da950609b54c75d7b6cfe3b5b3848015e Mon Sep 17 00:00:00 2001 From: Yukinari Toyota Date: Fri, 1 Nov 2013 01:58:03 +0900 Subject: [PATCH] fix wiki pages rest api returns wrong comments. --- app/views/wiki/show.api.rsb | 2 +- test/integration/api_test/wiki_pages_test.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/wiki/show.api.rsb b/app/views/wiki/show.api.rsb index c353161..8e082e1 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 02c764f..d299911 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 -- 1.8.3.4