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
ac968370
Commit
ac968370
authored
Apr 12, 2021
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add additional test cases
parent
f3b033c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
9 deletions
+31
-9
spec/services/merge_requests/update_service_spec.rb
spec/services/merge_requests/update_service_spec.rb
+31
-9
No files found.
spec/services/merge_requests/update_service_spec.rb
View file @
ac968370
...
...
@@ -943,15 +943,37 @@ RSpec.describe MergeRequests::UpdateService, :mailer do
end
context
'updating asssignee_ids'
do
context
'when :use_specialized_service is true'
do
it
'passes the update action to ::MergeRequests::UpdateAssigneesService'
do
expect
(
::
MergeRequests
::
UpdateAssigneesService
)
.
to
receive
(
:new
).
and_call_original
update_merge_request
({
assignee_ids:
[
user2
.
id
],
use_specialized_service:
true
})
context
':use_specialized_service'
do
context
'when true'
do
it
'passes the update action to ::MergeRequests::UpdateAssigneesService'
do
expect
(
::
MergeRequests
::
UpdateAssigneesService
)
.
to
receive
(
:new
).
and_call_original
update_merge_request
({
assignee_ids:
[
user2
.
id
],
use_specialized_service:
true
})
end
end
context
'when false or nil'
do
before
do
expect
(
::
MergeRequests
::
UpdateAssigneesService
).
not_to
receive
(
:new
)
end
it
'does not pass the update action to ::MergeRequests::UpdateAssigneesService when false'
do
update_merge_request
({
assignee_ids:
[
user2
.
id
],
use_specialized_service:
false
})
end
it
'does not pass the update action to ::MergeRequests::UpdateAssigneesService when nil'
do
update_merge_request
({
assignee_ids:
[
user2
.
id
],
use_specialized_service:
nil
})
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