summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/checks/branch_check_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-12-01 09:51:31 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-12-01 09:51:31 +0000
commit37d5cece3603d8df9f75c507594e70dade80c99f (patch)
tree84e6d51a3329b4f9bd13bf92e61fe401446e2d2a /spec/lib/gitlab/checks/branch_check_spec.rb
parentf8796c0836e943a27e26250c7cd4a5766e567f61 (diff)
downloadgitlab-ce-37d5cece3603d8df9f75c507594e70dade80c99f.tar.gz
Add latest changes from gitlab-org/gitlab@14-5-stable-ee
Diffstat (limited to 'spec/lib/gitlab/checks/branch_check_spec.rb')
-rw-r--r--spec/lib/gitlab/checks/branch_check_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/checks/branch_check_spec.rb b/spec/lib/gitlab/checks/branch_check_spec.rb
index 3086cb1bd33..f503759f3f8 100644
--- a/spec/lib/gitlab/checks/branch_check_spec.rb
+++ b/spec/lib/gitlab/checks/branch_check_spec.rb
@@ -32,6 +32,15 @@ RSpec.describe Gitlab::Checks::BranchCheck do
expect { subject.validate! }.not_to raise_error
end
+ context "deleting a hexadecimal branch" do
+ let(:newrev) { "0000000000000000000000000000000000000000" }
+ let(:ref) { "refs/heads/267208abfe40e546f5e847444276f7d43a39503e" }
+
+ it "doesn't prohibit the deletion of a hexadecimal branch name" do
+ expect { subject.validate! }.not_to raise_error
+ end
+ end
+
context "the feature flag is disabled" do
it "doesn't prohibit a 40-character hexadecimal branch name" do
stub_feature_flags(prohibit_hexadecimal_branch_names: false)