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
948a1d40
Commit
948a1d40
authored
Oct 16, 2019
by
Jared Deckard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a regression test to ensure leading whitespace is preserved
parent
2e4632e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
spec/services/quick_actions/interpret_service_spec.rb
spec/services/quick_actions/interpret_service_spec.rb
+8
-0
No files found.
spec/services/quick_actions/interpret_service_spec.rb
View file @
948a1d40
...
@@ -1553,6 +1553,14 @@ describe QuickActions::InterpretService do
...
@@ -1553,6 +1553,14 @@ describe QuickActions::InterpretService do
expect
(
text
).
to
eq
(
"test
#{
described_class
::
SHRUG
}
\n
/close"
)
expect
(
text
).
to
eq
(
"test
#{
described_class
::
SHRUG
}
\n
/close"
)
end
end
it
'preserves leading whitespace '
do
content
=
" - list
\n\n
/close
\n\n
test
\n\n
"
text
,
_
=
service
.
execute
(
content
,
issue
)
expect
(
text
).
to
eq
(
" - list
\n\n
test"
)
end
context
'/create_merge_request command'
do
context
'/create_merge_request command'
do
let
(
:branch_name
)
{
'1-feature'
}
let
(
:branch_name
)
{
'1-feature'
}
let
(
:content
)
{
"/create_merge_request
#{
branch_name
}
"
}
let
(
:content
)
{
"/create_merge_request
#{
branch_name
}
"
}
...
...
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