Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
09a60352
Commit
09a60352
authored
Oct 03, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix conflict in spec/views/ci/lints/show.html.haml_spec.rb
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
70abcd5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
23 deletions
+37
-23
spec/views/ci/lints/show.html.haml_spec.rb
spec/views/ci/lints/show.html.haml_spec.rb
+37
-23
No files found.
spec/views/ci/lints/show.html.haml_spec.rb
View file @
09a60352
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment