From c95bc65519993f15fe0fca52db7c315f18053b55 Mon Sep 17 00:00:00 2001
From: Josh Frye <joshfng@gmail.com>
Date: Thu, 28 Jan 2016 13:04:24 -0500
Subject: [PATCH] Update tests

---
 spec/services/notes/create_service_spec.rb    |  4 +--
 .../notes/post_process_service_spec.rb        | 26 +++++++++++++++++++
 2 files changed, 27 insertions(+), 3 deletions(-)
 create mode 100644 spec/services/notes/post_process_service_spec.rb

diff --git a/spec/services/notes/create_service_spec.rb b/spec/services/notes/create_service_spec.rb
index a797a2fe4aa..ff23f13e1cb 100644
--- a/spec/services/notes/create_service_spec.rb
+++ b/spec/services/notes/create_service_spec.rb
@@ -14,9 +14,7 @@ describe Notes::CreateService, services: true do
           noteable_type: 'Issue',
           noteable_id: issue.id
         }
-
-        expect(project).to receive(:execute_hooks)
-        expect(project).to receive(:execute_services)
+        
         @note = Notes::CreateService.new(project, user, opts).execute
       end
 
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
-- 
GitLab