Commit 09a60352 authored by Rémy Coutable's avatar Rémy Coutable

Fix conflict in spec/views/ci/lints/show.html.haml_spec.rb

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 70abcd5e
require 'spec_helper' require 'spec_helper'
describe 'ci/lints/show' do describe 'ci/lints/show' do
<<<<<<< HEAD
include Devise::TestHelpers include Devise::TestHelpers
before do describe 'XSS protection' do
assign(:status, true) let(:config_processor) { Ci::GitlabCiYamlProcessor.new(YAML.dump(content)) }
assign(:stages, %w[test]) before do
assign(:builds, builds) assign(:status, true)
end assign(:builds, config_processor.builds)
assign(:stages, config_processor.stages)
context 'when builds attrbiutes contain HTML nodes' do assign(:jobs, config_processor.jobs)
let(:builds) do
[ { name: 'rspec', stage: 'test', commands: '<h1>rspec</h1>' } ]
end end
it 'does not render HTML elements' do context 'when builds attrbiutes contain HTML nodes' do
render let(:content) do
{
rspec: {
script: '<h1>rspec</h1>',
stage: 'test'
}
}
end
expect(rendered).not_to have_css('h1', text: 'rspec') it 'does not render HTML elements' do
end render
end
context 'when builds attributes do not contain HTML nodes' do expect(rendered).not_to have_css('h1', text: 'rspec')
let(:builds) do end
[ { name: 'rspec', stage: 'test', commands: 'rspec' } ]
end end
it 'shows configuration in the table' do context 'when builds attributes do not contain HTML nodes' do
render let(:content) do
{
rspec: {
script: 'rspec',
stage: 'test'
}
}
end
it 'shows configuration in the table' do
render
expect(rendered).to have_css('td pre', text: 'rspec')
end
end
end
expect(rendered).to have_css('td pre', text: 'rspec')
=======
let(:content) do let(:content) do
{ {
build_template: { build_template: {
...@@ -77,7 +92,6 @@ describe 'ci/lints/show' do ...@@ -77,7 +92,6 @@ describe 'ci/lints/show' do
expect(rendered).to have_content('Status: syntax is incorrect') expect(rendered).to have_content('Status: syntax is incorrect')
expect(rendered).to have_content('Error: Undefined error') expect(rendered).to have_content('Error: Undefined error')
expect(rendered).not_to have_content('Tag list:') expect(rendered).not_to have_content('Tag list:')
>>>>>>> ce/master
end end
end 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