Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Frye <joshfng@gmail.com>2016-01-28 21:04:24 +0300
committerJosh Frye <joshfng@gmail.com>2016-01-28 21:04:42 +0300
commitc95bc65519993f15fe0fca52db7c315f18053b55 (patch)
treeb9e05a87677b622085fe80e6aa382175d62d0cd3 /spec/services/notes/post_process_service_spec.rb
parentf9218898ece79275c585da3aeb932b7ede409776 (diff)
Update tests
Diffstat (limited to 'spec/services/notes/post_process_service_spec.rb')
-rw-r--r--spec/services/notes/post_process_service_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/services/notes/post_process_service_spec.rb b/spec/services/notes/post_process_service_spec.rb
new file mode 100644
index 00000000000..6b632f94b90
--- /dev/null
+++ b/spec/services/notes/post_process_service_spec.rb
@@ -0,0 +1,26 @@
+require 'spec_helper'
+
+describe Notes::CreateService, services: true do
+ let(:project) { create(:empty_project) }
+ let(:issue) { create(:issue, project: project) }
+ let(:user) { create(:user) }
+
+ describe :execute do
+ before do
+ project.team << [user, :master]
+ note_opts = {
+ note: 'Awesome comment',
+ noteable_type: 'Issue',
+ noteable_id: issue.id
+ }
+
+ @note = Notes::CreateService.new(project, user, note_opts).execute
+ end
+
+ it {
+ expect(project).to receive(:execute_hooks)
+ expect(project).to receive(:execute_services)
+ Notes::PostProcessService.new(@note).execute
+ }
+ end
+end