Commit 8eed7851 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Stub storage configuration using a helper

parent d7fa3443
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)
......
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment