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
2c910a71
Commit
2c910a71
authored
Apr 28, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub out calls to Gitlab::Git::Repository#exists? in spec
parent
8bb9e371
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
ee/spec/services/projects/update_repository_storage_service_spec.rb
...rvices/projects/update_repository_storage_service_spec.rb
+5
-0
No files found.
ee/spec/services/projects/update_repository_storage_service_spec.rb
View file @
2c910a71
...
...
@@ -19,6 +19,9 @@ describe Projects::UpdateRepositoryStorageService do
stub_storage_settings
(
storages
)
allow
(
Time
).
to
receive
(
:now
).
and_return
(
time
)
# This will force the creation of the repository and bypass Gitaly
allow_any_instance_of
(
Gitlab
::
Git
::
Repository
).
to
receive
(
:exists?
).
and_return
(
false
)
end
after
do
...
...
@@ -64,7 +67,9 @@ describe Projects::UpdateRepositoryStorageService do
let
(
:wiki_repository_double
)
{
double
(
:repository
)
}
before
do
allow_any_instance_of
(
Gitlab
::
Git
::
Repository
).
to
receive
(
:exists?
).
and_return
(
false
)
project
.
create_wiki
allow_any_instance_of
(
Gitlab
::
Git
::
Repository
).
to
receive
(
:exists?
).
and_return
(
true
)
# Default stub for non-specified params
allow
(
Gitlab
::
Git
::
Repository
).
to
receive
(
:new
).
and_call_original
...
...
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