Makes relations resource shallow (#7366).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6184 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-07-05 16:47:34 +00:00
parent 852cb183b1
commit 42f9dc7d2c
8 changed files with 41 additions and 29 deletions

View File

@@ -73,10 +73,10 @@ class ApiTest::IssueRelationsTest < ActionController::IntegrationTest
end
end
context "/issues/:issue_id/relations/:id" do
context "/relations/:id" do
context "GET" do
should "return the relation" do
get '/issues/3/relations/2.xml', {}, :authorization => credentials('jsmith')
get '/relations/2.xml', {}, :authorization => credentials('jsmith')
assert_response :success
assert_equal 'application/xml', @response.content_type
@@ -87,7 +87,7 @@ class ApiTest::IssueRelationsTest < ActionController::IntegrationTest
context "DELETE" do
should "delete the relation" do
assert_difference('IssueRelation.count', -1) do
delete '/issues/3/relations/2.xml', {}, :authorization => credentials('jsmith')
delete '/relations/2.xml', {}, :authorization => credentials('jsmith')
end
assert_response :ok