diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2017-09-29 19:05:20 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-10-04 13:57:41 +0300 |
commit | 147e2b21be180d4b405c6ebe861971cb0dc9e6b2 (patch) | |
tree | 6f476ae707b158015b4b61ffc046cda8c888acca /spec/models/repository_spec.rb | |
parent | 4a4f809353a2e7007f8c6d33bfb1e4d09ed5a560 (diff) |
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.rb | 10 |
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 |