diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-04-04 17:27:23 -0500 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-05 17:44:14 +0100 |
commit | c319f2114177f011cd0c6c23b04f7c19971268bf (patch) | |
tree | b91a2ace5426bea9a7c6a60eabbd44da394fa80c /spec/models/note_spec.rb | |
parent | afa53810deab37c95da245510a7cf85e8846a162 (diff) | |
download | gitlab-ce-c319f2114177f011cd0c6c23b04f7c19971268bf.tar.gz |
Address review comments
Diffstat (limited to 'spec/models/note_spec.rb')
-rw-r--r-- | spec/models/note_spec.rb | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 2c7f6e59b19..3c4bf3f4ddb 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -250,7 +250,7 @@ describe Note, models: true do let!(:note2) { create(:discussion_note_on_merge_request, in_reply_to: note) } let(:merge_request) { note.noteable } - it 'returns a discussion with multiple note' do + it 'returns a discussion with multiple notes' do discussion = merge_request.notes.find_discussion(note.discussion_id) expect(discussion).not_to be_nil @@ -379,57 +379,57 @@ describe Note, models: true do describe '#can_be_discussion_note?' do context 'for a note on a merge request' do - let(:note) { build(:note_on_merge_request) } - it 'returns true' do + note = build(:note_on_merge_request) + expect(note.can_be_discussion_note?).to be_truthy end end context 'for a note on an issue' do - let(:note) { build(:note_on_issue) } - it 'returns true' do + note = build(:note_on_issue) + expect(note.can_be_discussion_note?).to be_truthy end end context 'for a note on a commit' do - let(:note) { build(:note_on_commit) } - it 'returns true' do + note = build(:note_on_commit) + expect(note.can_be_discussion_note?).to be_truthy end end context 'for a note on a snippet' do - let(:note) { build(:note_on_project_snippet) } - it 'returns true' do + note = build(:note_on_project_snippet) + expect(note.can_be_discussion_note?).to be_truthy end end context 'for a diff note on merge request' do - let(:note) { build(:diff_note_on_merge_request) } - it 'returns false' do + note = build(:diff_note_on_merge_request) + expect(note.can_be_discussion_note?).to be_falsey end end context 'for a diff note on commit' do - let(:note) { build(:diff_note_on_commit) } - it 'returns false' do + note = build(:diff_note_on_commit) + expect(note.can_be_discussion_note?).to be_falsey end end context 'for a discussion note' do - let(:note) { build(:discussion_note_on_merge_request) } - it 'returns false' do + note = build(:discussion_note_on_merge_request) + expect(note.can_be_discussion_note?).to be_falsey end end |