summaryrefslogtreecommitdiff
path: root/spec/models/repository_spec.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-09-29 18:05:20 +0200
committerJacob Vosmaer <jacob@gitlab.com>2017-10-04 12:57:41 +0200
commit147e2b21be180d4b405c6ebe861971cb0dc9e6b2 (patch)
tree6f476ae707b158015b4b61ffc046cda8c888acca /spec/models/repository_spec.rb
parent4a4f809353a2e7007f8c6d33bfb1e4d09ed5a560 (diff)
downloadgitlab-ce-147e2b21be180d4b405c6ebe861971cb0dc9e6b2.tar.gz
Let fetch_ref pull from Gitaly instead of from disk
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index bdcdad46390..7156c1b7aa8 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -636,18 +636,18 @@ describe Repository do
describe '#fetch_ref' do
describe 'when storage is broken', broken_storage: true do
it 'should raise a storage error' do
- path = broken_repository.path_to_repo
-
- expect_to_raise_storage_error { broken_repository.fetch_ref(path, '1', '2') }
+ expect_to_raise_storage_error do
+ broken_repository.fetch_ref(broken_repository, source_ref: '1', target_ref: '2')
+ end
end
end
end
describe '#create_ref' do
- it 'redirects the call to fetch_ref' do
+ it 'redirects the call to write_ref' do
ref, ref_path = '1', '2'
- expect(repository).to receive(:fetch_ref).with(repository.path_to_repo, ref, ref_path)
+ expect(repository.raw_repository).to receive(:write_ref).with(ref_path, ref)
repository.create_ref(ref, ref_path)
end