diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-09-04 17:00:36 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-09-06 16:01:48 -0300 |
commit | 21096e2391e3e4c5d8e6ab1d430189429847248d (patch) | |
tree | f07eea62506b41674895f312abae0c97b5dea491 /spec/lib | |
parent | c1c4d7ed2b0dfa344dcf25b8dac0a5b65f90d712 (diff) | |
download | gitlab-ce-21096e2391e3e4c5d8e6ab1d430189429847248d.tar.gz |
Add Gitlab::GitalyClient::RemoteService#find_remote_root_ref
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/gitaly_client/remote_service_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client/remote_service_spec.rb b/spec/lib/gitlab/gitaly_client/remote_service_spec.rb index f03c7e3f04b..b8831c54aba 100644 --- a/spec/lib/gitlab/gitaly_client/remote_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/remote_service_spec.rb @@ -45,6 +45,17 @@ describe Gitlab::GitalyClient::RemoteService do end end + describe '#find_remote_root_ref' do + it 'sends an find_remote_root_ref message and returns the root ref' do + expect_any_instance_of(Gitaly::RemoteService::Stub) + .to receive(:find_remote_root_ref) + .with(gitaly_request_with_path(storage_name, relative_path), kind_of(Hash)) + .and_return(double(ref: 'master')) + + expect(client.find_remote_root_ref('origin')).to eq 'master' + end + end + describe '#update_remote_mirror' do let(:ref_name) { 'remote_mirror_1' } let(:only_branches_matching) { ['my-branch', 'master'] } |