Commit 331f1d37 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Returns simple path instead full_path for projects

parent 7cce1ef3
...@@ -12,7 +12,7 @@ module RelatedIssues ...@@ -12,7 +12,7 @@ module RelatedIssues
title: referenced_issue.title, title: referenced_issue.title,
iid: referenced_issue.iid, iid: referenced_issue.iid,
state: referenced_issue.state, state: referenced_issue.state,
project_full_path: referenced_issue.project.full_path, project_path: referenced_issue.project.path,
namespace_full_path: referenced_issue.project.namespace.full_path, namespace_full_path: referenced_issue.project.namespace.full_path,
path: namespace_project_issue_path(referenced_issue.project.namespace, referenced_issue.project, referenced_issue.iid), path: namespace_project_issue_path(referenced_issue.project.namespace, referenced_issue.project, referenced_issue.iid),
destroy_relation_path: destroy_relation_path(referenced_issue) destroy_relation_path: destroy_relation_path(referenced_issue)
......
...@@ -37,7 +37,7 @@ describe RelatedIssues::ListService, service: true do ...@@ -37,7 +37,7 @@ describe RelatedIssues::ListService, service: true do
it 'verifies number of queries' do it 'verifies number of queries' do
recorded = ActiveRecord::QueryRecorder.new { subject } recorded = ActiveRecord::QueryRecorder.new { subject }
expect(recorded.count).to be_within(1).of(42) expect(recorded.count).to be_within(1).of(39)
end end
it 'returns related issues JSON' do it 'returns related issues JSON' do
...@@ -49,7 +49,7 @@ describe RelatedIssues::ListService, service: true do ...@@ -49,7 +49,7 @@ describe RelatedIssues::ListService, service: true do
iid: issue_b.iid, iid: issue_b.iid,
state: issue_b.state, state: issue_b.state,
path: "/#{project.full_path}/issues/#{issue_b.iid}", path: "/#{project.full_path}/issues/#{issue_b.iid}",
project_full_path: issue_b.project.full_path, project_path: issue_b.project.path,
namespace_full_path: issue_b.project.namespace.full_path, namespace_full_path: issue_b.project.namespace.full_path,
destroy_relation_path: "/#{project.full_path}/issues/#{issue_b.iid}/related_issues/#{related_issue_a.id}" destroy_relation_path: "/#{project.full_path}/issues/#{issue_b.iid}/related_issues/#{related_issue_a.id}"
} }
...@@ -61,7 +61,7 @@ describe RelatedIssues::ListService, service: true do ...@@ -61,7 +61,7 @@ describe RelatedIssues::ListService, service: true do
iid: issue_c.iid, iid: issue_c.iid,
state: issue_c.state, state: issue_c.state,
path: "/#{project.full_path}/issues/#{issue_c.iid}", path: "/#{project.full_path}/issues/#{issue_c.iid}",
project_full_path: issue_c.project.full_path, project_path: issue_c.project.path,
namespace_full_path: issue_c.project.namespace.full_path, namespace_full_path: issue_c.project.namespace.full_path,
destroy_relation_path: "/#{project.full_path}/issues/#{issue_c.iid}/related_issues/#{related_issue_b.id}" destroy_relation_path: "/#{project.full_path}/issues/#{issue_c.iid}/related_issues/#{related_issue_b.id}"
} }
...@@ -73,7 +73,7 @@ describe RelatedIssues::ListService, service: true do ...@@ -73,7 +73,7 @@ describe RelatedIssues::ListService, service: true do
iid: issue_d.iid, iid: issue_d.iid,
state: issue_d.state, state: issue_d.state,
path: "/#{project.full_path}/issues/#{issue_d.iid}", path: "/#{project.full_path}/issues/#{issue_d.iid}",
project_full_path: issue_d.project.full_path, project_path: issue_d.project.path,
namespace_full_path: issue_d.project.namespace.full_path, namespace_full_path: issue_d.project.namespace.full_path,
destroy_relation_path: "/#{project.full_path}/issues/#{issue_d.iid}/related_issues/#{related_issue_c.id}" destroy_relation_path: "/#{project.full_path}/issues/#{issue_d.iid}/related_issues/#{related_issue_c.id}"
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment