summaryrefslogtreecommitdiffstats
path: root/test/integration/api_test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-11 10:19:11 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-11 10:19:11 +0000
commit5f57bceabbdccb9e13dd2f0a0a52a0e7fa704c6e (patch)
tree517aec2c2ce48a0b76317f1a58f0a524c7c0bfd0 /test/integration/api_test
parent10ba08ce13f2cfd088fb8eba0d8dd1be6145acc1 (diff)
downloadredmine-5f57bceabbdccb9e13dd2f0a0a52a0e7fa704c6e.tar.gz
redmine-5f57bceabbdccb9e13dd2f0a0a52a0e7fa704c6e.zip
Makes some attributes optional in API response to get faster/lightweight responses.
These attributes are not required for common uses case (eg. updating an object). They can be requested in the reponse using the 'include' parameter. Example GET /issues/1.xml?include=journals. The list of attributes that can be included in responses will be documented in the wiki. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4486 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/api_test')
-rw-r--r--test/integration/api_test/issues_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb
index 3988ee5b7..d3aa327f1 100644
--- a/test/integration/api_test/issues_test.rb
+++ b/test/integration/api_test/issues_test.rb
@@ -94,7 +94,7 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest
context "with journals" do
context ".xml" do
should "display journals" do
- get '/issues/1.xml'
+ get '/issues/1.xml?include=journals'
assert_tag :tag => 'issue',
:child => {
@@ -160,7 +160,7 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest
context ".xml" do
should "display children" do
- get '/issues/1.xml'
+ get '/issues/1.xml?include=children'
assert_tag :tag => 'issue',
:child => {
@@ -187,7 +187,7 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest
context ".json" do
should "display children" do
- get '/issues/1.json'
+ get '/issues/1.json?include=children'
json = ActiveSupport::JSON.decode(response.body)
assert_equal([