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