diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-06 20:04:17 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-12 15:24:05 +0300 |
commit | 9aefaa41ab1442f81ffc15ad9a8279bd1e92c91a (patch) | |
tree | 581326d413b1d83d237186c6a123da50787d3104 /spec/services/notes | |
parent | ba21c00f01bf4274d0e4cc3892293fc1e581b260 (diff) |
Fix code review issues
Diffstat (limited to 'spec/services/notes')
-rw-r--r-- | spec/services/notes/delete_service_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/services/notes/delete_service_spec.rb b/spec/services/notes/delete_service_spec.rb index 88e71c135d3..07aa57c4642 100644 --- a/spec/services/notes/delete_service_spec.rb +++ b/spec/services/notes/delete_service_spec.rb @@ -3,13 +3,14 @@ require 'spec_helper' describe Notes::DeleteService, services: true do let(:project) { create(:empty_project) } let(:issue) { create(:issue, project: project) } - let(:user) { create(:user) } - let(:note) { create(:note, project: project, noteable: issue, author: user, note: 'Note') } + let(:note) { create(:note, project: project, noteable: issue) } describe '#execute' do it 'deletes a note' do - Notes::DeleteService.new(project, user).execute(note) - expect(project.issues.find(issue.id).notes).to_not include(note) + project = note.project + described_class.new(project, note.author).execute(note) + + expect(project.issues.find(issue.id).notes).not_to include(note) end end end |