Commit eaa935d7 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix target project merge request link on build page

parent 70489d08
......@@ -16,7 +16,8 @@ class BuildDetailsEntity < JobEntity
end
expose :path do |build|
project_merge_request_path(build.project, build.merge_request)
project_merge_request_path(build.merge_request.project,
build.merge_request)
end
end
......
......@@ -81,9 +81,9 @@ describe BuildDetailsEntity do
expect(subject[:merge_request][:iid]).to eq merge_request.iid
end
it 'has a correct merge request path' do
it 'has a merge request path to a target project' do
expect(subject[:merge_request][:path])
.to include fork_project.full_path
.to include project.full_path
end
end
......
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