summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/git/repository_spec.rb
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-07-22 18:13:47 -0400
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-07-27 15:40:54 -0400
commit8e3f2ecfa9f479eca039d2223055d57617d8ba17 (patch)
tree0fe31af28cca93d59682b8d3ece289b1d063d7d3 /spec/lib/gitlab/git/repository_spec.rb
parent8065adcc1e7d69fe3c98fb951256b2514c9d28b6 (diff)
downloadgitlab-ce-8e3f2ecfa9f479eca039d2223055d57617d8ba17.tar.gz
Incorporate RefsService.FindAllBranches Gitaly RPCgitaly-all-branches
Diffstat (limited to 'spec/lib/gitlab/git/repository_spec.rb')
-rw-r--r--spec/lib/gitlab/git/repository_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb
index d9d95e22e3b..50736d353ad 100644
--- a/spec/lib/gitlab/git/repository_spec.rb
+++ b/spec/lib/gitlab/git/repository_spec.rb
@@ -939,16 +939,21 @@ describe Gitlab::Git::Repository, seed_helper: true do
context 'with deleted branch with Gitaly disabled' do
before do
allow(Gitlab::GitalyClient).to receive(:feature_enabled?).and_return(false)
+ end
+
+ it 'returns no results' do
ref = double()
allow(ref).to receive(:name) { 'bad-branch' }
allow(ref).to receive(:target) { raise Rugged::ReferenceError }
branches = double()
allow(branches).to receive(:each) { [ref].each }
allow(repository.rugged).to receive(:branches) { branches }
- end
- it { is_expected.to eq([]) }
+ expect(subject).to be_empty
+ end
end
+
+ it_behaves_like 'wrapping gRPC errors', Gitlab::GitalyClient::RefService, :branches
end
describe '#branch_count' do