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
664b91fd
Commit
664b91fd
authored
Aug 24, 2020
by
Alex Pooley
Committed by
Sean McGivern
Aug 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed setup! from worker spec
parent
5a378f14
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
spec/workers/pages_transfer_worker_spec.rb
spec/workers/pages_transfer_worker_spec.rb
+10
-12
No files found.
spec/workers/pages_transfer_worker_spec.rb
View file @
664b91fd
...
...
@@ -13,8 +13,6 @@ RSpec.describe PagesTransferWorker do
before
do
FileUtils
.
mkdir_p
(
pages_path_before
)
FileUtils
.
touch
(
config_path_before
)
setup!
end
after
do
...
...
@@ -54,7 +52,7 @@ RSpec.describe PagesTransferWorker do
# Store the path before we change it
let!
(
:args
)
{
[
project
.
path
,
subgroup
.
full_path
,
new_path
]
}
def
setup!
before
do
# We need to skip hooks, otherwise the directory will be moved
# via an ActiveRecord callback
subgroup
.
update_columns
(
parent_id:
group_2
.
id
)
...
...
@@ -73,11 +71,11 @@ RSpec.describe PagesTransferWorker do
let
(
:meth
)
{
'move_project'
}
let
(
:args
)
{
[
project
.
path
,
group_1
.
full_path
,
group_2
.
full_path
]
}
def
setup!
project
.
update!
(
group:
group_2
)
include_examples
'moving a pages directory'
do
before
do
project
.
update!
(
group:
group_2
)
end
end
include_examples
'moving a pages directory'
end
describe
'when method is rename_project'
do
...
...
@@ -89,11 +87,11 @@ RSpec.describe PagesTransferWorker do
# Store the path before we change it
let!
(
:args
)
{
[
project
.
path
,
new_path
,
project
.
namespace
.
full_path
]
}
def
setup!
project
.
update!
(
path:
new_path
)
include_examples
'moving a pages directory'
do
before
do
project
.
update!
(
path:
new_path
)
end
end
include_examples
'moving a pages directory'
end
describe
'when method is rename_namespace'
do
...
...
@@ -106,7 +104,7 @@ RSpec.describe PagesTransferWorker do
# Store the path before we change it
let!
(
:args
)
{
[
project
.
namespace
.
full_path
,
new_path
]
}
def
setup!
before
do
# We need to skip hooks, otherwise the directory will be moved
# via an ActiveRecord callback
group
.
update_columns
(
path:
new_path
)
...
...
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