diff options
Diffstat (limited to 'spec/lib/gitlab/git/repository_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git/repository_spec.rb | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb index 9da33b94c5e..2f49bd1bcf2 100644 --- a/spec/lib/gitlab/git/repository_spec.rb +++ b/spec/lib/gitlab/git/repository_spec.rb @@ -588,12 +588,12 @@ describe Gitlab::Git::Repository, seed_helper: true do end end - describe '#fetch_mirror' do + describe '#fetch_as_mirror_without_shell' do let(:new_repository) do Gitlab::Git::Repository.new('default', 'my_project.git', '') end - subject { new_repository.fetch_mirror(repository.path) } + subject { new_repository.fetch_as_mirror_without_shell(repository.path) } before do Gitlab::Shell.new.add_repository('default', 'my_project') @@ -1652,15 +1652,15 @@ describe Gitlab::Git::Repository, seed_helper: true do end end - describe '#fetch' do + describe '#fetch_remote_without_shell' do let(:git_path) { Gitlab.config.git.bin_path } let(:remote_name) { 'my_remote' } - subject { repository.fetch(remote_name) } + subject { repository.fetch_remote_without_shell(remote_name) } it 'fetches the remote and returns true if the command was successful' do expect(repository).to receive(:popen) - .with(%W(#{git_path} fetch #{remote_name}), repository.path) + .with(%W(#{git_path} fetch #{remote_name}), repository.path, {}) .and_return(['', 0]) expect(subject).to be(true) @@ -1777,21 +1777,6 @@ describe Gitlab::Git::Repository, seed_helper: true do end end - describe '#fetch' do - let(:git_path) { Gitlab.config.git.bin_path } - let(:remote_name) { 'my_remote' } - - subject { repository.fetch(remote_name) } - - it 'fetches the remote and returns true if the command was successful' do - expect(repository).to receive(:popen) - .with(%W(#{git_path} fetch #{remote_name}), repository.path) - .and_return(['', 0]) - - expect(subject).to be(true) - end - end - describe '#delete_all_refs_except' do let(:repository) do Gitlab::Git::Repository.new('default', TEST_MUTABLE_REPO_PATH, '') |