提交 2388ca0f 编写于 作者: D Dmitriy Zaporozhets

Revert notification specs

上级 7fefb039
...@@ -2,6 +2,7 @@ require 'spec_helper' ...@@ -2,6 +2,7 @@ require 'spec_helper'
describe NotificationService do describe NotificationService do
let(:notification) { NotificationService.new } let(:notification) { NotificationService.new }
describe 'Keys' do describe 'Keys' do
describe :new_key do describe :new_key do
let(:key) { create(:personal_key) } let(:key) { create(:personal_key) }
...@@ -158,7 +159,6 @@ describe NotificationService do ...@@ -158,7 +159,6 @@ describe NotificationService do
let(:merge_request) { create :merge_request, assignee: create(:user) } let(:merge_request) { create :merge_request, assignee: create(:user) }
before do before do
build_team(merge_request.source_project)
build_team(merge_request.target_project) build_team(merge_request.target_project)
end end
...@@ -235,16 +235,11 @@ describe NotificationService do ...@@ -235,16 +235,11 @@ describe NotificationService do
end end
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) def build_team(project)
@u_watcher = u_watcher @u_watcher = create(:user, notification_level: Notification::N_WATCH)
@u_participating = u_participating @u_participating = create(:user, notification_level: Notification::N_PARTICIPATING)
@u_disabled = u_disabled @u_disabled = create(:user, notification_level: Notification::N_DISABLED)
@u_mentioned = u_mentioned @u_mentioned = create(:user, username: 'mention', notification_level: Notification::N_PARTICIPATING)
project.team << [@u_watcher, :master] project.team << [@u_watcher, :master]
project.team << [@u_participating, :master] project.team << [@u_participating, :master]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册