diff options
Diffstat (limited to 'spec/lib/gitlab/checks/branch_check_spec.rb')
-rw-r--r-- | spec/lib/gitlab/checks/branch_check_spec.rb | 9 |
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) |