Fix target project merge request link on build page

This commit is contained in:
Grzegorz Bizon 2017-07-21 13:09:13 +02:00
parent 70489d08b7
commit eaa935d77b
2 changed files with 4 additions and 3 deletions

View file

@ -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

View file

@ -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