Commit e056aa3e authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix ambiguous templates in view specs

These fail in Rails 6 because a template with the same
name but different format is being rendered
parent c34c3811
...@@ -845,7 +845,7 @@ describe Repository do ...@@ -845,7 +845,7 @@ describe Repository do
end end
describe '#get_raw_changes' do describe '#get_raw_changes' do
context `with non-UTF8 bytes in paths` do context 'with non-UTF8 bytes in paths' do
let(:old_rev) { 'd0888d297eadcd7a345427915c309413b1231e65' } let(:old_rev) { 'd0888d297eadcd7a345427915c309413b1231e65' }
let(:new_rev) { '19950f03c765f7ac8723a73a0599764095f52fc0' } let(:new_rev) { '19950f03c765f7ac8723a73a0599764095f52fc0' }
let(:changes) { repository.raw_changes_between(old_rev, new_rev) } let(:changes) { repository.raw_changes_between(old_rev, new_rev) }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
require 'spec_helper' require 'spec_helper'
describe 'projects/commits/_commit.html.haml' do describe 'projects/commits/_commit.html.haml' do
let(:template) { 'projects/commits/commit.html.haml' }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:commit) { project.repository.commit(ref) } let(:commit) { project.repository.commit(ref) }
...@@ -14,7 +15,7 @@ describe 'projects/commits/_commit.html.haml' do ...@@ -14,7 +15,7 @@ describe 'projects/commits/_commit.html.haml' do
let(:ref) { GpgHelpers::SIGNED_COMMIT_SHA } let(:ref) { GpgHelpers::SIGNED_COMMIT_SHA }
it 'does not display a loading spinner for GPG status' do it 'does not display a loading spinner for GPG status' do
render partial: 'projects/commits/commit', locals: { render partial: template, locals: {
project: project, project: project,
ref: ref, ref: ref,
commit: commit commit: commit
...@@ -50,7 +51,7 @@ describe 'projects/commits/_commit.html.haml' do ...@@ -50,7 +51,7 @@ describe 'projects/commits/_commit.html.haml' do
end end
it 'does not display a ci status icon' do it 'does not display a ci status icon' do
render partial: 'projects/commits/commit', locals: { render partial: template, locals: {
project: project, project: project,
ref: ref, ref: ref,
commit: commit commit: commit
...@@ -66,7 +67,7 @@ describe 'projects/commits/_commit.html.haml' do ...@@ -66,7 +67,7 @@ describe 'projects/commits/_commit.html.haml' do
end end
it 'does display a ci status icon when pipelines are enabled' do it 'does display a ci status icon when pipelines are enabled' do
render partial: 'projects/commits/commit', locals: { render partial: template, locals: {
project: project, project: project,
ref: ref, ref: ref,
commit: commit commit: commit
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'projects/show' do describe 'projects/show.html.haml' do
include Devise::Test::ControllerHelpers include Devise::Test::ControllerHelpers
let(:user) { create(:admin) } let(:user) { create(:admin) }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe 'projects/tags/index' do describe 'projects/tags/index.html.haml' do
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:tags) { TagsFinder.new(project.repository, {}).execute } let(:tags) { TagsFinder.new(project.repository, {}).execute }
let(:git_tag) { project.repository.tags.last } let(:git_tag) { project.repository.tags.last }
......
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