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
8eed7851
Commit
8eed7851
authored
Aug 07, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub storage configuration using a helper
parent
d7fa3443
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
spec/services/projects/update_repository_storage_service_spec.rb
...rvices/projects/update_repository_storage_service_spec.rb
+3
-1
spec/services/projects/update_service_spec.rb
spec/services/projects/update_service_spec.rb
+3
-1
No files found.
spec/services/projects/update_repository_storage_service_spec.rb
View file @
8eed7851
require
'spec_helper'
describe
Projects
::
UpdateRepositoryStorageService
do
include
StubConfiguration
subject
{
described_class
.
new
(
project
)
}
describe
"#execute"
do
...
...
@@ -15,7 +17,7 @@ describe Projects::UpdateRepositoryStorageService do
'a'
=>
{
'path'
=>
'tmp/tests/storage_a'
},
'b'
=>
{
'path'
=>
'tmp/tests/storage_b'
}
}
allow
(
Gitlab
.
config
.
repositories
).
to
receive
(
:storages
).
and_return
(
storages
)
stub_storage_settings
(
storages
)
allow
(
subject
).
to
receive
(
:gitlab_shell
).
and_return
(
gitlab_shell
)
allow
(
Time
).
to
receive
(
:now
).
and_return
(
time
)
...
...
spec/services/projects/update_service_spec.rb
View file @
8eed7851
require
'spec_helper'
describe
Projects
::
UpdateService
,
'#execute'
do
include
StubConfiguration
let
(
:user
)
{
create
(
:user
)
}
let
(
:admin
)
{
create
(
:admin
)
}
...
...
@@ -148,7 +150,7 @@ describe Projects::UpdateService, '#execute' do
'a'
=>
{
'path'
=>
'tmp/tests/storage_a'
},
'b'
=>
{
'path'
=>
'tmp/tests/storage_b'
}
}
allow
(
Gitlab
.
config
.
repositories
).
to
receive
(
:storages
).
and_return
(
storages
)
stub_storage_settings
(
storages
)
end
after
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