summaryrefslogtreecommitdiff
path: root/spec/models/todo_spec.rb
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-03-18 13:24:47 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-03-18 13:24:47 -0300
commit2a8858ca8adbc54d7e24e698fa8ce370a1e91157 (patch)
treef57df67358d3c113412e9f9f910e18515f835ddf /spec/models/todo_spec.rb
parent05975e96f98521a219788a0bec3d6f71458833e1 (diff)
downloadgitlab-ce-2a8858ca8adbc54d7e24e698fa8ce370a1e91157.tar.gz
Rename `Todo#to_reference` to `Todo#target_reference`
Since we're not actually returning a todo reference.
Diffstat (limited to 'spec/models/todo_spec.rb')
-rw-r--r--spec/models/todo_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/todo_spec.rb b/spec/models/todo_spec.rb
index 0fbd36f3a22..22acfdfe2c0 100644
--- a/spec/models/todo_spec.rb
+++ b/spec/models/todo_spec.rb
@@ -115,18 +115,18 @@ describe Todo, models: true do
end
end
- describe '#to_reference' do
+ describe '#target_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.short_id
+ expect(subject.target_reference).to eq commit.short_id
end
it 'returns reference for issuables' do
subject.target = issue
- expect(subject.to_reference).to eq issue.to_reference
+ expect(subject.target_reference).to eq issue.to_reference
end
end
end