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
83e6de25
Commit
83e6de25
authored
Mar 21, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use expect_any_instance_of not to receive on repository backfill spec
parent
67e51e9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
spec/services/geo/repository_backfill_service_spec.rb
spec/services/geo/repository_backfill_service_spec.rb
+3
-15
No files found.
spec/services/geo/repository_backfill_service_spec.rb
View file @
83e6de25
...
...
@@ -68,15 +68,9 @@ describe Geo::RepositoryBackfillService, services: true do
let
(
:project
)
{
create
(
:project
)
}
it
'does not fetch the project repositories'
do
fetch_count
=
0
allow_any_instance_of
(
Repository
).
to
receive
(
:fetch_geo_mirror
)
do
fetch_count
+=
1
end
expect_any_instance_of
(
Repository
).
not_to
receive
(
:fetch_geo_mirror
)
subject
.
execute
expect
(
fetch_count
).
to
eq
0
end
context
'tracking database'
do
...
...
@@ -87,7 +81,7 @@ describe Geo::RepositoryBackfillService, services: true do
end
context
'when repository was backfilled'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
let!
(
:registry
)
do
Geo
::
ProjectRegistry
.
create
(
...
...
@@ -98,15 +92,9 @@ describe Geo::RepositoryBackfillService, services: true do
end
it
'does not fetch the project repositories'
do
fetch_count
=
0
allow_any_instance_of
(
Repository
).
to
receive
(
:fetch_geo_mirror
)
do
fetch_count
+=
1
end
expect_any_instance_of
(
Repository
).
not_to
receive
(
:fetch_geo_mirror
)
subject
.
execute
expect
(
fetch_count
).
to
eq
0
end
context
'tracking database'
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