From 231d4fb9f8a30e97fd9bcb7176ad8337557f6ea0 Mon Sep 17 00:00:00 2001 From: Douglas Barbosa Alexandre Date: Fri, 18 Mar 2016 10:32:22 -0300 Subject: Use `Commit#short_id` instead of `Commit.truncate_sha` --- spec/models/todo_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spec/models/todo_spec.rb') diff --git a/spec/models/todo_spec.rb b/spec/models/todo_spec.rb index ad744216421..0fbd36f3a22 100644 --- a/spec/models/todo_spec.rb +++ b/spec/models/todo_spec.rb @@ -117,9 +117,11 @@ describe Todo, models: true do describe '#to_reference' do it 'returns the short commit id for commits' do + subject.project = project subject.target_type = 'Commit' subject.commit_id = commit.id - expect(subject.to_reference).to eq Commit.truncate_sha(commit.id) + + expect(subject.to_reference).to eq commit.short_id end it 'returns reference for issuables' do -- cgit v1.2.1