diff options
author | Jarka Košanová <jarka@gitlab.com> | 2018-12-10 12:51:21 +0100 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-01-08 02:30:37 +0800 |
commit | c4d18b05846b0ca05b6aa5306596478f71752e48 (patch) | |
tree | 5d1d47cfd5fda4acf1768f9712a2852de459a99e /spec/models/note_spec.rb | |
parent | 0c1d6be13cb52afb32d23d625a6400e28f0a991e (diff) | |
download | gitlab-ce-c4d18b05846b0ca05b6aa5306596478f71752e48.tar.gz |
Use parent instead of project
Add support for group entities to quick actions
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r-- | spec/models/note_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index bcdfe3cf1eb..385b8a7959f 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -890,4 +890,19 @@ describe Note do end end end + + describe '#parent' do + it 'returns project for project notes' do + project = create(:project) + note = create(:note_on_issue, project: project) + + expect(note.parent).to eq(project) + end + + it 'returns nil for personal snippet note' do + note = create(:note_on_personal_snippet) + + expect(note.parent).to be_nil + end + end end |