summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-10-11 10:05:22 +0000
committerRémy Coutable <remy@rymai.me>2017-10-11 10:05:22 +0000
commit143ace07ad8c81e5de6f3fd926db7547e7288860 (patch)
tree4c5cac979ff872449a6bc1d751aac7a17737955f /spec
parent22ade6e7cb2fedd7ad88f897fb501fce9f427bbd (diff)
parent06e7eeb1c22bf380ad8f3d35581ed63132adf5d6 (diff)
downloadgitlab-ce-143ace07ad8c81e5de6f3fd926db7547e7288860.tar.gz
Merge branch 'gitaly-has-local-branches' into 'master'
Use Gitaly's RepositoryService.HasLocalBranches RPC See merge request gitlab-org/gitlab-ce!14753
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/gitaly_client/repository_service_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client/repository_service_spec.rb b/spec/lib/gitlab/gitaly_client/repository_service_spec.rb
index fd5f984601e..cbc7ce1c1b0 100644
--- a/spec/lib/gitlab/gitaly_client/repository_service_spec.rb
+++ b/spec/lib/gitlab/gitaly_client/repository_service_spec.rb
@@ -73,4 +73,15 @@ describe Gitlab::GitalyClient::RepositoryService do
client.apply_gitattributes(revision)
end
end
+
+ describe '#has_local_branches?' do
+ it 'sends a has_local_branches message' do
+ expect_any_instance_of(Gitaly::RepositoryService::Stub)
+ .to receive(:has_local_branches)
+ .with(gitaly_request_with_path(storage_name, relative_path), kind_of(Hash))
+ .and_return(double(value: true))
+
+ expect(client.has_local_branches?).to be(true)
+ end
+ end
end