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
91ec7f2b
Commit
91ec7f2b
authored
Mar 25, 2019
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove EE-specific lines from Issues::MoveService spec
parent
e865e1da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
+21
-16
ee/spec/services/ee/issues/move_service_spec.rb
ee/spec/services/ee/issues/move_service_spec.rb
+21
-2
spec/services/issues/move_service_spec.rb
spec/services/issues/move_service_spec.rb
+0
-14
No files found.
ee/spec/services/ee/issues/move_service_spec.rb
View file @
91ec7f2b
...
...
@@ -7,14 +7,33 @@ describe Issues::MoveService do
let
(
:old_issue
)
{
create
(
:issue
,
project:
old_project
,
author:
user
)
}
let
(
:move_service
)
{
described_class
.
new
(
old_project
,
user
)
}
before
do
old_project
.
add_reporter
(
user
)
new_project
.
add_reporter
(
user
)
end
describe
'#execute'
do
context
'group issue hooks'
do
let!
(
:hook
)
{
create
(
:group_hook
,
group:
new_project
.
group
,
issues_events:
true
)
}
it
'executes group issue hooks'
do
allow_any_instance_of
(
WebHookService
).
to
receive
(
:execute
)
# Ideally, we'd test that `WebHookWorker.jobs.size` increased by 1,
# but since the entire spec run takes place in a transaction, we never
# actually get to the `after_commit` hook that queues these jobs.
expect
{
move_service
.
execute
(
old_issue
,
new_project
)
}
.
not_to
raise_error
# Sidekiq::Worker::EnqueueFromTransactionError
end
end
end
describe
'#rewrite_epic_issue'
do
context
'issue assigned to epic'
do
let!
(
:epic_issue
)
{
create
(
:epic_issue
,
issue:
old_issue
)
}
before
do
stub_licensed_features
(
epics:
true
)
old_project
.
add_reporter
(
user
)
new_project
.
add_reporter
(
user
)
end
it
'updates epic issue reference'
do
...
...
spec/services/issues/move_service_spec.rb
View file @
91ec7f2b
...
...
@@ -138,20 +138,6 @@ describe Issues::MoveService do
.
not_to
raise_error
# Sidekiq::Worker::EnqueueFromTransactionError
end
end
context
'group issue hooks'
do
let!
(
:hook
)
{
create
(
:group_hook
,
group:
new_project
.
group
,
issues_events:
true
)
}
it
'executes group issue hooks'
do
allow_any_instance_of
(
WebHookService
).
to
receive
(
:execute
)
# Ideally, we'd test that `WebHookWorker.jobs.size` increased by 1,
# but since the entire spec run takes place in a transaction, we never
# actually get to the `after_commit` hook that queues these jobs.
expect
{
move_service
.
execute
(
old_issue
,
new_project
)
}
.
not_to
raise_error
# Sidekiq::Worker::EnqueueFromTransactionError
end
end
end
describe
'move permissions'
do
...
...
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