diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-01-30 03:49:07 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-01-30 03:52:29 +0300 |
commit | d97742570fce0512eddb6dc6c924d541aa4f57e4 (patch) | |
tree | a36e3b79cd3439b4d4d6de11b9e204f85e4131df /spec/lib/banzai/filter/commit_reference_filter_spec.rb | |
parent | dec21517186f7406da2efd76569b4dff4fa711e0 (diff) |
Increase the minimum length for commit SHA matching to 7
This is the git default and will help to prevent false positive matches.
Closes #12706
Diffstat (limited to 'spec/lib/banzai/filter/commit_reference_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/commit_reference_filter_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/banzai/filter/commit_reference_filter_spec.rb b/spec/lib/banzai/filter/commit_reference_filter_spec.rb index 473534ba68a..63a32d9d455 100644 --- a/spec/lib/banzai/filter/commit_reference_filter_spec.rb +++ b/spec/lib/banzai/filter/commit_reference_filter_spec.rb @@ -21,7 +21,7 @@ describe Banzai::Filter::CommitReferenceFilter, lib: true do let(:reference) { commit.id } # Let's test a variety of commit SHA sizes just to be paranoid - [6, 8, 12, 18, 20, 32, 40].each do |size| + [7, 8, 12, 18, 20, 32, 40].each do |size| it "links to a valid reference of #{size} characters" do doc = reference_filter("See #{reference[0...size]}") @@ -35,7 +35,7 @@ describe Banzai::Filter::CommitReferenceFilter, lib: true do doc = reference_filter("See #{commit.id}") expect(doc.text).to eq "See #{commit.short_id}" - doc = reference_filter("See #{commit.id[0...6]}") + doc = reference_filter("See #{commit.id[0...7]}") expect(doc.text).to eq "See #{commit.short_id}" end |