summaryrefslogtreecommitdiff
path: root/spec/models/note_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-10-12 20:28:21 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-10-12 20:28:21 +0000
commitb956605f9e5f95ded853d3458f0f132dbb5b892a (patch)
treedd1596c99ab5766e8749f45acb1e5a0d22e1a4d1 /spec/models/note_spec.rb
parent66dd61ef0f1f98f860bdef5aa2cdb1c6f2e1f83f (diff)
parentb02c21df5cc0dcc795f71f8c11d05d61dc2ad897 (diff)
downloadgitlab-ce-fondev.tar.gz
Merge branch 'ambiguous-sha' into 'master'fondev
Fix ambiguous sha problem with mentioned commit Before: write in database only 6 chars of commit sha. This cause to `Ambiguous SHA1 prefix` exception. - [x] write full commit sha in db. - [x] Standardise usage of sha truncation: 8 characters everywhere. - [x] prevent exception when ambiguous sha requested in markdown Fixes #1644 See merge request !1171
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r--spec/models/note_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index eeecd714a28..2d839e9611b 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -228,7 +228,7 @@ describe Note do
it { should be_valid }
its(:noteable) { should == issue }
- its(:note) { should == "_mentioned in commit #{commit.sha[0..5]}_" }
+ its(:note) { should == "_mentioned in commit #{commit.sha}_" }
end
context 'merge request from an issue' do
@@ -267,7 +267,7 @@ describe Note do
its(:noteable_type) { should == "Commit" }
its(:noteable_id) { should be_nil }
its(:commit_id) { should == commit.id }
- its(:note) { should == "_mentioned in commit #{parent_commit.id[0...6]}_" }
+ its(:note) { should == "_mentioned in commit #{parent_commit.id}_" }
end
end