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
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-08 18:42:27 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-08 18:42:27 +0400
commit2388ca0f3299ceb06b234fe08eaa71d79e6f0801 (patch)
treee817a50c6106658432ea83a9ab8866ee7ec96c42 /spec
parent7fefb0397eea99910537541bbba70d0a68a44644 (diff)
Revert notification specs
Diffstat (limited to 'spec')
-rw-r--r--spec/services/notification_service_spec.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index a6ceb67de1b..6a63a8aceb2 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -2,6 +2,7 @@ require 'spec_helper'
describe NotificationService do
let(:notification) { NotificationService.new }
+
describe 'Keys' do
describe :new_key do
let(:key) { create(:personal_key) }
@@ -158,7 +159,6 @@ describe NotificationService do
let(:merge_request) { create :merge_request, assignee: create(:user) }
before do
- build_team(merge_request.source_project)
build_team(merge_request.target_project)
end
@@ -235,16 +235,11 @@ describe NotificationService do
end
end
- let(:u_watcher) { create(:user, notification_level: Notification::N_WATCH) }
- let(:u_participating) { create(:user, notification_level: Notification::N_PARTICIPATING) }
- let(:u_disabled) { create(:user, notification_level: Notification::N_DISABLED) }
- let(:u_mentioned) { create(:user, username: 'mention', notification_level: Notification::N_WATCH) }
-
def build_team(project)
- @u_watcher = u_watcher
- @u_participating = u_participating
- @u_disabled = u_disabled
- @u_mentioned = u_mentioned
+ @u_watcher = create(:user, notification_level: Notification::N_WATCH)
+ @u_participating = create(:user, notification_level: Notification::N_PARTICIPATING)
+ @u_disabled = create(:user, notification_level: Notification::N_DISABLED)
+ @u_mentioned = create(:user, username: 'mention', notification_level: Notification::N_PARTICIPATING)
project.team << [@u_watcher, :master]
project.team << [@u_participating, :master]