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
d686047b
Commit
d686047b
authored
Mar 06, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use twice over .exactly(2).times
parent
9a79707e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
spec/services/geo/repository_backfill_service_spec.rb
spec/services/geo/repository_backfill_service_spec.rb
+1
-1
spec/workers/geo_backfill_worker_spec.rb
spec/workers/geo_backfill_worker_spec.rb
+2
-2
No files found.
spec/services/geo/repository_backfill_service_spec.rb
View file @
d686047b
...
...
@@ -28,7 +28,7 @@ describe Geo::RepositoryBackfillService, services: true do
end
it
'releases leases'
do
expect
(
Gitlab
::
ExclusiveLease
).
to
receive
(
:cancel
).
exactly
(
2
)
.
and_call_original
expect
(
Gitlab
::
ExclusiveLease
).
to
receive
(
:cancel
).
twice
.
and_call_original
subject
.
execute
end
...
...
spec/workers/geo_backfill_worker_spec.rb
View file @
d686047b
...
...
@@ -9,7 +9,7 @@ describe Geo::GeoBackfillWorker, services: true do
describe
'#perform'
do
it
'performs GeoSingleRepositoryBackfillWorker for each project'
do
expect
(
GeoSingleRepositoryBackfillWorker
).
to
receive
(
:new
).
exactly
(
2
)
.
and_call_original
expect
(
GeoSingleRepositoryBackfillWorker
).
to
receive
(
:new
).
twice
.
and_call_original
subject
.
perform
end
...
...
@@ -25,7 +25,7 @@ describe Geo::GeoBackfillWorker, services: true do
it
'does not perform GeoSingleRepositoryBackfillWorker for projects that repository exists'
do
create_list
(
:project
,
2
)
expect
(
GeoSingleRepositoryBackfillWorker
).
to
receive
(
:new
).
exactly
(
2
)
.
and_call_original
expect
(
GeoSingleRepositoryBackfillWorker
).
to
receive
(
:new
).
twice
.
and_call_original
subject
.
perform
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