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
88a21685
Commit
88a21685
authored
Aug 03, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve spec for Geo::RepositoriesCleanUpWorker
parent
aa06b60e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
spec/workers/geo/repositories_clean_up_worker_spec.rb
spec/workers/geo/repositories_clean_up_worker_spec.rb
+6
-6
No files found.
spec/workers/geo/repositories_clean_up_worker_spec.rb
View file @
88a21685
require
'spec_helper'
describe
Geo
::
RepositoriesCleanUpWorker
do
let!
(
:geo_node
)
{
create
(
:geo_node
)
}
let
(
:
group
)
{
create
(
:group
)
}
let!
(
:project_
1
)
{
create
(
:project
,
group:
group
)
}
let!
(
:
project_2
)
{
create
(
:project
)
}
let!
(
:geo_node
)
{
create
(
:geo_node
)
}
let
(
:
synced_group
)
{
create
(
:group
)
}
let!
(
:project_
in_synced_group
)
{
create
(
:project
,
group:
synced_
group
)
}
let!
(
:
unsynced_project
)
{
create
(
:project
)
}
describe
'#perform'
do
before
do
...
...
@@ -13,10 +13,10 @@ describe Geo::RepositoriesCleanUpWorker do
context
'when node has namespace restrictions'
do
it
'performs GeoRepositoryDestroyWorker for each project that does not belong to selected namespaces to replicate'
do
geo_node
.
update_attribute
(
:namespaces
,
[
group
])
geo_node
.
update_attribute
(
:namespaces
,
[
synced_
group
])
expect
(
GeoRepositoryDestroyWorker
).
to
receive
(
:perform_async
)
.
with
(
project_2
.
id
,
project_2
.
name
,
project_2
.
full_path
)
.
with
(
unsynced_project
.
id
,
unsynced_project
.
name
,
unsynced_project
.
full_path
)
.
once
.
and_return
(
1
)
subject
.
perform
(
geo_node
.
id
)
...
...
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