@@ -0,0 +1,7 | |||||
|
1 | api.relation do | |||
|
2 | api.id @relation.id | |||
|
3 | api.issue_id @relation.issue_from_id | |||
|
4 | api.issue_to_id @relation.issue_to_id | |||
|
5 | api.relation_type @relation.relation_type_for(@issue) | |||
|
6 | api.delay @relation.delay | |||
|
7 | end |
@@ -0,0 +1,83 | |||||
|
1 | # Redmine - project management software | |||
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |||
|
3 | # | |||
|
4 | # This program is free software; you can redistribute it and/or | |||
|
5 | # modify it under the terms of the GNU General Public License | |||
|
6 | # as published by the Free Software Foundation; either version 2 | |||
|
7 | # of the License, or (at your option) any later version. | |||
|
8 | # | |||
|
9 | # This program is distributed in the hope that it will be useful, | |||
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
12 | # GNU General Public License for more details. | |||
|
13 | # | |||
|
14 | # You should have received a copy of the GNU General Public License | |||
|
15 | # along with this program; if not, write to the Free Software | |||
|
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
|
17 | ||||
|
18 | require File.expand_path('../../../test_helper', __FILE__) | |||
|
19 | ||||
|
20 | class ApiTest::IssueRelationsTest < ActionController::IntegrationTest | |||
|
21 | fixtures :all | |||
|
22 | ||||
|
23 | def setup | |||
|
24 | Setting.rest_api_enabled = '1' | |||
|
25 | end | |||
|
26 | ||||
|
27 | context "/issues/:issue_id/relations" do | |||
|
28 | context "POST" do | |||
|
29 | should "create a relation" do | |||
|
30 | assert_difference('IssueRelation.count') do | |||
|
31 | post '/issues/2/relations.xml', {:relation => {:issue_to_id => 7, :relation_type => 'relates'}}, :authorization => credentials('jsmith') | |||
|
32 | end | |||
|
33 | ||||
|
34 | relation = IssueRelation.first(:order => 'id DESC') | |||
|
35 | assert_equal 2, relation.issue_from_id | |||
|
36 | assert_equal 7, relation.issue_to_id | |||
|
37 | assert_equal 'relates', relation.relation_type | |||
|
38 | ||||
|
39 | assert_response :created | |||
|
40 | assert_equal 'application/xml', @response.content_type | |||
|
41 | assert_tag 'relation', :child => {:tag => 'id', :content => relation.id.to_s} | |||
|
42 | end | |||
|
43 | ||||
|
44 | context "with failure" do | |||
|
45 | should "return the errors" do | |||
|
46 | assert_no_difference('IssueRelation.count') do | |||
|
47 | post '/issues/2/relations.xml', {:relation => {:issue_to_id => 7, :relation_type => 'foo'}}, :authorization => credentials('jsmith') | |||
|
48 | end | |||
|
49 | ||||
|
50 | assert_response :unprocessable_entity | |||
|
51 | assert_tag :errors, :child => {:tag => 'error', :content => 'relation_type is not included in the list'} | |||
|
52 | end | |||
|
53 | end | |||
|
54 | end | |||
|
55 | end | |||
|
56 | ||||
|
57 | context "/issues/:issue_id/relations/:id" do | |||
|
58 | context "GET" do | |||
|
59 | should "return the relation" do | |||
|
60 | get '/issues/3/relations/2.xml', {}, :authorization => credentials('jsmith') | |||
|
61 | ||||
|
62 | assert_response :success | |||
|
63 | assert_equal 'application/xml', @response.content_type | |||
|
64 | assert_tag 'relation', :child => {:tag => 'id', :content => '2'} | |||
|
65 | end | |||
|
66 | end | |||
|
67 | ||||
|
68 | context "DELETE" do | |||
|
69 | should "delete the relation" do | |||
|
70 | assert_difference('IssueRelation.count', -1) do | |||
|
71 | delete '/issues/3/relations/2.xml', {}, :authorization => credentials('jsmith') | |||
|
72 | end | |||
|
73 | ||||
|
74 | assert_response :ok | |||
|
75 | assert_nil IssueRelation.find_by_id(2) | |||
|
76 | end | |||
|
77 | end | |||
|
78 | end | |||
|
79 | ||||
|
80 | def credentials(user, password=nil) | |||
|
81 | ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user) | |||
|
82 | end | |||
|
83 | end |
@@ -1,5 +1,5 | |||||
1 |
# |
|
1 | # Redmine - project management software | |
2 |
# Copyright (C) 2006-20 |
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
@@ -17,14 +17,28 | |||||
17 |
|
17 | |||
18 | class IssueRelationsController < ApplicationController |
|
18 | class IssueRelationsController < ApplicationController | |
19 | before_filter :find_issue, :find_project_from_association, :authorize |
|
19 | before_filter :find_issue, :find_project_from_association, :authorize | |
|
20 | accept_key_auth :show, :create, :destroy | |||
20 |
|
21 | |||
21 |
def |
|
22 | def show | |
|
23 | @relation = @issue.find_relation(params[:id]) | |||
|
24 | ||||
|
25 | respond_to do |format| | |||
|
26 | format.html { render :nothing => true } | |||
|
27 | format.api | |||
|
28 | end | |||
|
29 | rescue ActiveRecord::RecordNotFound | |||
|
30 | render_404 | |||
|
31 | end | |||
|
32 | ||||
|
33 | verify :method => :post, :only => :create, :render => {:nothing => true, :status => :method_not_allowed } | |||
|
34 | def create | |||
22 | @relation = IssueRelation.new(params[:relation]) |
|
35 | @relation = IssueRelation.new(params[:relation]) | |
23 | @relation.issue_from = @issue |
|
36 | @relation.issue_from = @issue | |
24 | if params[:relation] && m = params[:relation][:issue_to_id].to_s.match(/^#?(\d+)$/) |
|
37 | if params[:relation] && m = params[:relation][:issue_to_id].to_s.match(/^#?(\d+)$/) | |
25 | @relation.issue_to = Issue.visible.find_by_id(m[1].to_i) |
|
38 | @relation.issue_to = Issue.visible.find_by_id(m[1].to_i) | |
26 | end |
|
39 | end | |
27 | @relation.save if request.post? |
|
40 | saved = @relation.save | |
|
41 | ||||
28 | respond_to do |format| |
|
42 | respond_to do |format| | |
29 | format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue } |
|
43 | format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue } | |
30 | format.js do |
|
44 | format.js do | |
@@ -37,22 +51,31 class IssueRelationsController < ApplicationController | |||||
37 | end |
|
51 | end | |
38 | end |
|
52 | end | |
39 | end |
|
53 | end | |
|
54 | format.api { | |||
|
55 | if saved | |||
|
56 | render :action => 'show', :status => :created, :location => issue_relation_url(@issue, @relation) | |||
|
57 | else | |||
|
58 | render_validation_errors(@relation) | |||
|
59 | end | |||
|
60 | } | |||
40 | end |
|
61 | end | |
41 | end |
|
62 | end | |
42 |
|
63 | |||
|
64 | verify :method => :delete, :only => :destroy, :render => {:nothing => true, :status => :method_not_allowed } | |||
43 | def destroy |
|
65 | def destroy | |
44 |
relation = |
|
66 | relation = @issue.find_relation(params[:id]) | |
45 | if request.post? && @issue.relations.include?(relation) |
|
67 | relation.destroy | |
46 | relation.destroy |
|
68 | ||
47 | @issue.reload |
|
|||
48 | end |
|
|||
49 | respond_to do |format| |
|
69 | respond_to do |format| | |
50 | format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue } |
|
70 | format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue } | |
51 | format.js { |
|
71 | format.js { | |
52 | @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? } |
|
72 | @relations = @issue.reload.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? } | |
53 | render(:update) {|page| page.replace_html "relations", :partial => 'issues/relations'} |
|
73 | render(:update) {|page| page.replace_html "relations", :partial => 'issues/relations'} | |
54 | } |
|
74 | } | |
|
75 | format.api { head :ok } | |||
55 | end |
|
76 | end | |
|
77 | rescue ActiveRecord::RecordNotFound | |||
|
78 | render_404 | |||
56 | end |
|
79 | end | |
57 |
|
80 | |||
58 | private |
|
81 | private |
@@ -501,6 +501,11 class Issue < ActiveRecord::Base | |||||
501 | def relations |
|
501 | def relations | |
502 | (relations_from + relations_to).sort |
|
502 | (relations_from + relations_to).sort | |
503 | end |
|
503 | end | |
|
504 | ||||
|
505 | # Finds an issue relation given its id. | |||
|
506 | def find_relation(relation_id) | |||
|
507 | IssueRelation.find(relation_id, :conditions => ["issue_to_id = ? OR issue_from_id = ?", id, id]) | |||
|
508 | end | |||
504 |
|
509 | |||
505 | def all_dependent_issues(except=[]) |
|
510 | def all_dependent_issues(except=[]) | |
506 | except << self |
|
511 | except << self |
@@ -20,7 +20,7 | |||||
20 | <td class="start_date"><%= format_date(relation.other_issue(@issue).start_date) %></td> |
|
20 | <td class="start_date"><%= format_date(relation.other_issue(@issue).start_date) %></td> | |
21 | <td class="due_date"><%= format_date(relation.other_issue(@issue).due_date) %></td> |
|
21 | <td class="due_date"><%= format_date(relation.other_issue(@issue).due_date) %></td> | |
22 | <td class="buttons"><%= link_to_remote(image_tag('link_break.png'), { :url => {:controller => 'issue_relations', :action => 'destroy', :issue_id => @issue, :id => relation}, |
|
22 | <td class="buttons"><%= link_to_remote(image_tag('link_break.png'), { :url => {:controller => 'issue_relations', :action => 'destroy', :issue_id => @issue, :id => relation}, | |
23 |
:method => : |
|
23 | :method => :delete | |
24 | }, :title => l(:label_relation_delete)) if authorize_for('issue_relations', 'destroy') %></td> |
|
24 | }, :title => l(:label_relation_delete)) if authorize_for('issue_relations', 'destroy') %></td> | |
25 | </tr> |
|
25 | </tr> | |
26 | <% end %> |
|
26 | <% end %> | |
@@ -29,7 +29,7 | |||||
29 | <% end %> |
|
29 | <% end %> | |
30 |
|
30 | |||
31 | <% remote_form_for(:relation, @relation, |
|
31 | <% remote_form_for(:relation, @relation, | |
32 |
:url => {:controller => 'issue_relations', :action => ' |
|
32 | :url => {:controller => 'issue_relations', :action => 'create', :issue_id => @issue}, | |
33 | :method => :post, |
|
33 | :method => :post, | |
34 | :complete => "Form.Element.focus('relation_issue_to_id');", |
|
34 | :complete => "Form.Element.focus('relation_issue_to_id');", | |
35 | :html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}) do |f| %> |
|
35 | :html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}) do |f| %> |
@@ -27,7 +27,7 api.issue do | |||||
27 |
|
27 | |||
28 | api.array :relations do |
|
28 | api.array :relations do | |
29 | @relations.each do |relation| |
|
29 | @relations.each do |relation| | |
30 |
api.relation(:id => relation.id, :issue_id => relation. |
|
30 | api.relation(:id => relation.id, :issue_id => relation.issue_from_id, :issue_to_id => relation.issue_to_id, :relation_type => relation.relation_type_for(@issue), :delay => relation.delay) | |
31 | end |
|
31 | end | |
32 | end if include_in_api_response?('relations') && @relations.present? |
|
32 | end if include_in_api_response?('relations') && @relations.present? | |
33 |
|
33 |
@@ -110,17 +110,13 ActionController::Routing::Routes.draw do |map| | |||||
110 |
|
110 | |||
111 | map.resources :issues, :member => { :edit => :post }, :collection => {} do |issues| |
|
111 | map.resources :issues, :member => { :edit => :post }, :collection => {} do |issues| | |
112 | issues.resources :time_entries, :controller => 'timelog' |
|
112 | issues.resources :time_entries, :controller => 'timelog' | |
|
113 | issues.resources :relations, :controller => 'issue_relations', :only => [:show, :create, :destroy] | |||
113 | end |
|
114 | end | |
114 |
|
115 | |||
115 | map.resources :issues, :path_prefix => '/projects/:project_id', :collection => { :create => :post } do |issues| |
|
116 | map.resources :issues, :path_prefix => '/projects/:project_id', :collection => { :create => :post } do |issues| | |
116 | issues.resources :time_entries, :controller => 'timelog' |
|
117 | issues.resources :time_entries, :controller => 'timelog' | |
117 | end |
|
118 | end | |
118 |
|
119 | |||
119 | map.with_options :controller => 'issue_relations', :conditions => {:method => :post} do |relations| |
|
|||
120 | relations.connect 'issues/:issue_id/relations/:id', :action => 'new' |
|
|||
121 | relations.connect 'issues/:issue_id/relations/:id/destroy', :action => 'destroy' |
|
|||
122 | end |
|
|||
123 |
|
||||
124 | map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new' |
|
120 | map.connect 'projects/:id/members/new', :controller => 'members', :action => 'new' | |
125 |
|
121 | |||
126 | map.with_options :controller => 'users' do |users| |
|
122 | map.with_options :controller => 'users' do |users| | |
@@ -235,7 +231,6 ActionController::Routing::Routes.draw do |map| | |||||
235 | map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards' |
|
231 | map.connect 'projects/:project_id/boards/:action/:id', :controller => 'boards' | |
236 | map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages' |
|
232 | map.connect 'boards/:board_id/topics/:action/:id', :controller => 'messages' | |
237 | map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki' |
|
233 | map.connect 'wiki/:id/:page/:action', :page => nil, :controller => 'wiki' | |
238 | map.connect 'issues/:issue_id/relations/:action/:id', :controller => 'issue_relations' |
|
|||
239 | map.connect 'projects/:project_id/news/:action', :controller => 'news' |
|
234 | map.connect 'projects/:project_id/news/:action', :controller => 'news' | |
240 | map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/ |
|
235 | map.connect 'projects/:project_id/timelog/:action/:id', :controller => 'timelog', :project_id => /.+/ | |
241 | map.with_options :controller => 'repositories' do |omap| |
|
236 | map.with_options :controller => 'repositories' do |omap| |
@@ -69,7 +69,7 Redmine::AccessControl.map do |map| | |||||
69 | :reports => [:issue_report, :issue_report_details]} |
|
69 | :reports => [:issue_report, :issue_report_details]} | |
70 | map.permission :add_issues, {:issues => [:new, :create, :update_form]} |
|
70 | map.permission :add_issues, {:issues => [:new, :create, :update_form]} | |
71 | map.permission :edit_issues, {:issues => [:edit, :update, :bulk_edit, :bulk_update, :update_form], :journals => [:new]} |
|
71 | map.permission :edit_issues, {:issues => [:edit, :update, :bulk_edit, :bulk_update, :update_form], :journals => [:new]} | |
72 |
map.permission :manage_issue_relations, {:issue_relations => [: |
|
72 | map.permission :manage_issue_relations, {:issue_relations => [:show, :create, :destroy]} | |
73 | map.permission :manage_subtasks, {} |
|
73 | map.permission :manage_subtasks, {} | |
74 | map.permission :set_issues_private, {} |
|
74 | map.permission :set_issues_private, {} | |
75 | map.permission :set_own_issues_private, {}, :require => :loggedin |
|
75 | map.permission :set_own_issues_private, {}, :require => :loggedin |
@@ -1,3 +1,20 | |||||
|
1 | # Redmine - project management software | |||
|
2 | # Copyright (C) 2006-2011 Jean-Philippe Lang | |||
|
3 | # | |||
|
4 | # This program is free software; you can redistribute it and/or | |||
|
5 | # modify it under the terms of the GNU General Public License | |||
|
6 | # as published by the Free Software Foundation; either version 2 | |||
|
7 | # of the License, or (at your option) any later version. | |||
|
8 | # | |||
|
9 | # This program is distributed in the hope that it will be useful, | |||
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
|
12 | # GNU General Public License for more details. | |||
|
13 | # | |||
|
14 | # You should have received a copy of the GNU General Public License | |||
|
15 | # along with this program; if not, write to the Free Software | |||
|
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||
|
17 | ||||
1 | require File.expand_path('../../test_helper', __FILE__) |
|
18 | require File.expand_path('../../test_helper', __FILE__) | |
2 | require 'issue_relations_controller' |
|
19 | require 'issue_relations_controller' | |
3 |
|
20 | |||
@@ -25,18 +42,18 class IssueRelationsControllerTest < ActionController::TestCase | |||||
25 | User.current = nil |
|
42 | User.current = nil | |
26 | end |
|
43 | end | |
27 |
|
44 | |||
28 |
def test_ |
|
45 | def test_create | |
29 | assert_difference 'IssueRelation.count' do |
|
46 | assert_difference 'IssueRelation.count' do | |
30 | @request.session[:user_id] = 3 |
|
47 | @request.session[:user_id] = 3 | |
31 |
post : |
|
48 | post :create, :issue_id => 1, | |
32 | :relation => {:issue_to_id => '2', :relation_type => 'relates', :delay => ''} |
|
49 | :relation => {:issue_to_id => '2', :relation_type => 'relates', :delay => ''} | |
33 | end |
|
50 | end | |
34 | end |
|
51 | end | |
35 |
|
52 | |||
36 |
def test_ |
|
53 | def test_create_xhr | |
37 | assert_difference 'IssueRelation.count' do |
|
54 | assert_difference 'IssueRelation.count' do | |
38 | @request.session[:user_id] = 3 |
|
55 | @request.session[:user_id] = 3 | |
39 |
xhr :post, : |
|
56 | xhr :post, :create, | |
40 | :issue_id => 3, |
|
57 | :issue_id => 3, | |
41 | :relation => {:issue_to_id => '1', :relation_type => 'relates', :delay => ''} |
|
58 | :relation => {:issue_to_id => '1', :relation_type => 'relates', :delay => ''} | |
42 | assert_select_rjs 'relations' do |
|
59 | assert_select_rjs 'relations' do | |
@@ -46,19 +63,19 class IssueRelationsControllerTest < ActionController::TestCase | |||||
46 | end |
|
63 | end | |
47 | end |
|
64 | end | |
48 |
|
65 | |||
49 |
def test_ |
|
66 | def test_create_should_accept_id_with_hash | |
50 | assert_difference 'IssueRelation.count' do |
|
67 | assert_difference 'IssueRelation.count' do | |
51 | @request.session[:user_id] = 3 |
|
68 | @request.session[:user_id] = 3 | |
52 |
post : |
|
69 | post :create, :issue_id => 1, | |
53 | :relation => {:issue_to_id => '#2', :relation_type => 'relates', :delay => ''} |
|
70 | :relation => {:issue_to_id => '#2', :relation_type => 'relates', :delay => ''} | |
54 | end |
|
71 | end | |
55 | end |
|
72 | end | |
56 |
|
73 | |||
57 |
def test_ |
|
74 | def test_create_should_not_break_with_non_numerical_id | |
58 | assert_no_difference 'IssueRelation.count' do |
|
75 | assert_no_difference 'IssueRelation.count' do | |
59 | assert_nothing_raised do |
|
76 | assert_nothing_raised do | |
60 | @request.session[:user_id] = 3 |
|
77 | @request.session[:user_id] = 3 | |
61 |
post : |
|
78 | post :create, :issue_id => 1, | |
62 | :relation => {:issue_to_id => 'foo', :relation_type => 'relates', :delay => ''} |
|
79 | :relation => {:issue_to_id => 'foo', :relation_type => 'relates', :delay => ''} | |
63 | end |
|
80 | end | |
64 | end |
|
81 | end | |
@@ -70,7 +87,7 class IssueRelationsControllerTest < ActionController::TestCase | |||||
70 |
|
87 | |||
71 | assert_no_difference 'IssueRelation.count' do |
|
88 | assert_no_difference 'IssueRelation.count' do | |
72 | @request.session[:user_id] = 3 |
|
89 | @request.session[:user_id] = 3 | |
73 |
post : |
|
90 | post :create, :issue_id => 1, | |
74 | :relation => {:issue_to_id => '4', :relation_type => 'relates', :delay => ''} |
|
91 | :relation => {:issue_to_id => '4', :relation_type => 'relates', :delay => ''} | |
75 | end |
|
92 | end | |
76 | end |
|
93 | end | |
@@ -80,7 +97,7 class IssueRelationsControllerTest < ActionController::TestCase | |||||
80 | def test_destroy |
|
97 | def test_destroy | |
81 | assert_difference 'IssueRelation.count', -1 do |
|
98 | assert_difference 'IssueRelation.count', -1 do | |
82 | @request.session[:user_id] = 3 |
|
99 | @request.session[:user_id] = 3 | |
83 |
|
|
100 | delete :destroy, :id => '2', :issue_id => '3' | |
84 | end |
|
101 | end | |
85 | end |
|
102 | end | |
86 |
|
103 | |||
@@ -92,7 +109,7 class IssueRelationsControllerTest < ActionController::TestCase | |||||
92 |
|
109 | |||
93 | assert_difference 'IssueRelation.count', -1 do |
|
110 | assert_difference 'IssueRelation.count', -1 do | |
94 | @request.session[:user_id] = 3 |
|
111 | @request.session[:user_id] = 3 | |
95 |
xhr : |
|
112 | xhr :delete, :destroy, :id => '2', :issue_id => '3' | |
96 | assert_select_rjs 'relations' do |
|
113 | assert_select_rjs 'relations' do | |
97 | assert_select 'table', 1 |
|
114 | assert_select 'table', 1 | |
98 | assert_select 'tr', 1 # relation left |
|
115 | assert_select 'tr', 1 # relation left |
@@ -118,8 +118,17 class RoutingTest < ActionController::IntegrationTest | |||||
118 | end |
|
118 | end | |
119 |
|
119 | |||
120 | context "issue relations" do |
|
120 | context "issue relations" do | |
121 |
should_route :post, "/issues/1/relations", :controller => 'issue_relations', :action => ' |
|
121 | should_route :post, "/issues/1/relations", :controller => 'issue_relations', :action => 'create', :issue_id => '1' | |
122 |
should_route :post, "/issues/1/relations |
|
122 | should_route :post, "/issues/1/relations.xml", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'xml' | |
|
123 | should_route :post, "/issues/1/relations.json", :controller => 'issue_relations', :action => 'create', :issue_id => '1', :format => 'json' | |||
|
124 | ||||
|
125 | should_route :get, "/issues/1/relations/23", :controller => 'issue_relations', :action => 'show', :issue_id => '1', :id => '23' | |||
|
126 | should_route :get, "/issues/1/relations/23.xml", :controller => 'issue_relations', :action => 'show', :issue_id => '1', :id => '23', :format => 'xml' | |||
|
127 | should_route :get, "/issues/1/relations/23.json", :controller => 'issue_relations', :action => 'show', :issue_id => '1', :id => '23', :format => 'json' | |||
|
128 | ||||
|
129 | should_route :delete, "/issues/1/relations/23", :controller => 'issue_relations', :action => 'destroy', :issue_id => '1', :id => '23' | |||
|
130 | should_route :delete, "/issues/1/relations/23.xml", :controller => 'issue_relations', :action => 'destroy', :issue_id => '1', :id => '23', :format => 'xml' | |||
|
131 | should_route :delete, "/issues/1/relations/23.json", :controller => 'issue_relations', :action => 'destroy', :issue_id => '1', :id => '23', :format => 'json' | |||
123 | end |
|
132 | end | |
124 |
|
133 | |||
125 | context "issue reports" do |
|
134 | context "issue reports" do |
General Comments 0
You need to be logged in to leave comments.
Login now