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
651ff7df
Commit
651ff7df
authored
Dec 20, 2019
by
James Fargher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use table-driven spec
parent
c2a219d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
ee/spec/services/quick_actions/interpret_service_spec.rb
ee/spec/services/quick_actions/interpret_service_spec.rb
+12
-16
No files found.
ee/spec/services/quick_actions/interpret_service_spec.rb
View file @
651ff7df
...
...
@@ -709,6 +709,16 @@ describe QuickActions::InterpretService do
end
context
'submit_review command'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:note
)
do
[
'I like it'
,
'/submit_review'
]
end
with_them
do
let
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project
)
}
let
(
:content
)
{
'/submit_review'
}
let!
(
:draft_note
)
{
create
(
:draft_note
,
note:
note
,
merge_request:
merge_request
,
author:
current_user
)
}
...
...
@@ -717,20 +727,6 @@ describe QuickActions::InterpretService do
stub_licensed_features
(
batch_comments:
true
)
end
context
'note has normal text'
do
let
(
:note
)
{
'I like it'
}
it
'submits the users current review'
do
_
,
_
,
message
=
service
.
execute
(
content
,
merge_request
)
expect
{
draft_note
.
reload
}.
to
raise_error
(
ActiveRecord
::
RecordNotFound
)
expect
(
message
).
to
eq
(
'Submitted the current review.'
)
end
end
context
'note has /submit_review'
do
let
(
:note
)
{
'/submit_review'
}
it
'submits the users current review'
do
_
,
_
,
message
=
service
.
execute
(
content
,
merge_request
)
...
...
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