Commit 4cc44102 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '199863-fix-new-mr-ui' into 'master'

Fix new MR UI not rendering commit info

See merge request gitlab-org/gitlab!24140
parents 4816319c 5b314ae8
......@@ -18,7 +18,7 @@ module CommitsHelper
end
def commit_to_html(commit, ref, project)
render 'projects/commits/commit',
render 'projects/commits/commit.html',
commit: commit,
ref: ref,
project: project
......
......@@ -69,4 +69,17 @@ describe CommitsHelper do
expect(node[:href]).to eq('http://example.com/file.html')
end
end
describe '#commit_to_html' do
let(:project) { create(:project, :repository) }
let(:ref) { 'master' }
let(:commit) { project.commit(ref) }
it 'renders HTML representation of a commit' do
assign(:project, project)
allow(helper).to receive(:current_user).and_return(project.owner)
expect(helper.commit_to_html(commit, ref, project)).to include('<div class="commit-content')
end
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