Commit 5b314ae8 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix new MR UI not rendering commit info

parent 23216ee8
......@@ -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