diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-05-19 08:42:16 +0300 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-05-22 14:33:25 +0300 |
commit | a2e7f2941f813f1da397ef17d86912ee9f894217 (patch) | |
tree | d21815a03be130beef8c34d07230b6e18380ec24 /spec | |
parent | a0afe659c8cbdeede06e85a7f5d050a847c86f46 (diff) |
Merge branch 'xeodon/gitlab-ce-fix/45743-master-fix-gitaly-delete-refs' into 'master'
Fix error when deleting an empty list of refs
Closes #45743
See merge request gitlab-org/gitlab-ce!19053
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/git/repository_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb index cce84276fe3..664d8a00dd9 100644 --- a/spec/lib/gitlab/git/repository_spec.rb +++ b/spec/lib/gitlab/git/repository_spec.rb @@ -600,6 +600,10 @@ describe Gitlab::Git::Repository, seed_helper: true do end end + it 'does not fail when deleting an empty list of refs' do + expect { repo.delete_refs(*[]) }.not_to raise_error + end + it 'raises an error if it failed' do expect { repo.delete_refs('refs\heads\fix') }.to raise_error(Gitlab::Git::Repository::GitError) end |