diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-31 15:08:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-31 15:08:33 +0300 |
commit | 1808454313ed75c92e1384466e8c83bfbc8ae25e (patch) | |
tree | 5c006c158fd796dc6d21e9bd771542f2fb0c24e2 /spec/helpers | |
parent | fd3a95f07ae9cd78fecffcfa5de4494f933a7808 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/commits_helper_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/helpers/commits_helper_spec.rb b/spec/helpers/commits_helper_spec.rb index cbc5566979b..dd268c2411f 100644 --- a/spec/helpers/commits_helper_spec.rb +++ b/spec/helpers/commits_helper_spec.rb @@ -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 |