mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 18:27:14 +02:00
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
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user