Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-10-09 02:44:18 +0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-10-10 20:26:32 +0300
commit06e7eeb1c22bf380ad8f3d35581ed63132adf5d6 (patch)
tree694c4961516c07024f5c39ae45a3fc8311553272 /spec/lib/gitlab/gitaly_client
parent9ac5338b8eb361927ad068486398b92acb0c287e (diff)
Use Gitaly's RepositoryService.HasLocalBranches RPC
Diffstat (limited to 'spec/lib/gitlab/gitaly_client')
-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