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
54be5f6e
Commit
54be5f6e
authored
Jun 14, 2021
by
Gary Holtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modifying spec to show filetype
parent
1609eabc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
spec/lib/gitlab/highlight_spec.rb
spec/lib/gitlab/highlight_spec.rb
+9
-3
No files found.
spec/lib/gitlab/highlight_spec.rb
View file @
54be5f6e
...
...
@@ -143,11 +143,17 @@ RSpec.describe Gitlab::Highlight do
end
describe
'highlight timeouts'
do
let
(
:result
)
{
described_class
.
highlight
(
file_name
,
content
)
}
let
(
:result
)
{
described_class
.
highlight
(
file_name
,
content
,
language:
"ruby"
)
}
context
'when there is an attempt'
do
it
"increments the attempt counter"
do
expect
{
result
}.
to
change
{
highlight_attempt_total
(
"undefined"
)
}
it
"increments the attempt counter with a defined language"
do
expect
{
result
}.
to
change
{
highlight_attempt_total
(
"ruby"
)
}
end
it
"increments the attempt counter with an undefined language"
do
expect
do
described_class
.
highlight
(
file_name
,
content
)
end
.
to
change
{
highlight_attempt_total
(
"undefined"
)
}
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