summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/todo_spec.rb4
1 files changed, 3 insertions, 1 deletions
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