summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-09-04 17:00:36 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-09-06 16:01:48 -0300
commit21096e2391e3e4c5d8e6ab1d430189429847248d (patch)
treef07eea62506b41674895f312abae0c97b5dea491 /spec/lib
parentc1c4d7ed2b0dfa344dcf25b8dac0a5b65f90d712 (diff)
downloadgitlab-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.rb11
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'] }