summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2018-01-17 20:25:16 -0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2018-01-22 13:51:02 -0300
commitd86751d842f9547af0b7db17eacb89e940a106f7 (patch)
tree7bec074baf4bfa3c5091060df10bae375395288f /spec
parent7fa0a3e7775703ad9e53216f6154a773ca17ad4a (diff)
downloadgitlab-ce-d86751d842f9547af0b7db17eacb89e940a106f7.tar.gz
Incorporate Gitaly's RemoteService.UpdateRemoteMirror RPCgitaly-update-remote-mirror
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/gitaly_client/remote_service_spec.rb14
1 files changed, 14 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 9d540446532..872377c93d8 100644
--- a/spec/lib/gitlab/gitaly_client/remote_service_spec.rb
+++ b/spec/lib/gitlab/gitaly_client/remote_service_spec.rb
@@ -44,4 +44,18 @@ describe Gitlab::GitalyClient::RemoteService do
expect(client.fetch_internal_remote(remote_repository)).to be(true)
end
end
+
+ describe '#update_remote_mirror' do
+ let(:ref_name) { 'remote_mirror_1' }
+ let(:only_branches_matching) { ['my-branch', 'master'] }
+
+ it 'sends an update_remote_mirror message' do
+ expect_any_instance_of(Gitaly::RemoteService::Stub)
+ .to receive(:update_remote_mirror)
+ .with(kind_of(Enumerator), kind_of(Hash))
+ .and_return(double(:update_remote_mirror_response))
+
+ client.update_remote_mirror(ref_name, only_branches_matching)
+ end
+ end
end