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
35e02900
Commit
35e02900
authored
Jul 19, 2018
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert use of any_instance as it does not work with prepend
parent
bd6f1ceb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
spec/services/notes/create_service_spec.rb
spec/services/notes/create_service_spec.rb
+3
-1
spec/support/shared_examples/services/boards/issues_move_service.rb
...rt/shared_examples/services/boards/issues_move_service.rb
+3
-1
No files found.
spec/services/notes/create_service_spec.rb
View file @
35e02900
...
@@ -145,7 +145,9 @@ describe Notes::CreateService do
...
@@ -145,7 +145,9 @@ describe Notes::CreateService do
let
(
:note_text
)
{
%(HELLO\n/close\n/assign @#{user.username}\nWORLD)
}
let
(
:note_text
)
{
%(HELLO\n/close\n/assign @#{user.username}\nWORLD)
}
it
'saves the note and does not alter the note text'
do
it
'saves the note and does not alter the note text'
do
expect_any_instance_of
(
Issues
::
UpdateService
).
to
receive
(
:execute
).
and_call_original
service
=
double
(
:service
)
allow
(
Issues
::
UpdateService
).
to
receive
(
:new
).
and_return
(
service
)
expect
(
service
).
to
receive
(
:execute
)
note
=
described_class
.
new
(
project
,
user
,
opts
.
merge
(
note:
note_text
)).
execute
note
=
described_class
.
new
(
project
,
user
,
opts
.
merge
(
note:
note_text
)).
execute
...
...
spec/support/shared_examples/services/boards/issues_move_service.rb
View file @
35e02900
...
@@ -4,7 +4,9 @@ shared_examples 'issues move service' do |group|
...
@@ -4,7 +4,9 @@ shared_examples 'issues move service' do |group|
let
(
:params
)
{
{
board_id:
board1
.
id
,
from_list_id:
list1
.
id
,
to_list_id:
list2
.
id
}
}
let
(
:params
)
{
{
board_id:
board1
.
id
,
from_list_id:
list1
.
id
,
to_list_id:
list2
.
id
}
}
it
'delegates the label changes to Issues::UpdateService'
do
it
'delegates the label changes to Issues::UpdateService'
do
expect_any_instance_of
(
Issues
::
UpdateService
).
to
receive
(
:execute
).
with
(
issue
).
once
service
=
double
(
:service
)
expect
(
Issues
::
UpdateService
).
to
receive
(
:new
).
and_return
(
service
)
expect
(
service
).
to
receive
(
:execute
).
with
(
issue
).
once
described_class
.
new
(
parent
,
user
,
params
).
execute
(
issue
)
described_class
.
new
(
parent
,
user
,
params
).
execute
(
issue
)
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