Commit 2388ca0f3299ceb06b234fe08eaa71d79e6f0801
1 parent
7fefb039
Exists in
master
and in
4 other branches
Revert notification specs
Showing
1 changed file
with
5 additions
and
10 deletions
Show diff stats
spec/services/notification_service_spec.rb
| @@ -2,6 +2,7 @@ require 'spec_helper' | @@ -2,6 +2,7 @@ require 'spec_helper' | ||
| 2 | 2 | ||
| 3 | describe NotificationService do | 3 | describe NotificationService do |
| 4 | let(:notification) { NotificationService.new } | 4 | let(:notification) { NotificationService.new } |
| 5 | + | ||
| 5 | describe 'Keys' do | 6 | describe 'Keys' do |
| 6 | describe :new_key do | 7 | describe :new_key do |
| 7 | let(:key) { create(:personal_key) } | 8 | let(:key) { create(:personal_key) } |
| @@ -158,7 +159,6 @@ describe NotificationService do | @@ -158,7 +159,6 @@ describe NotificationService do | ||
| 158 | let(:merge_request) { create :merge_request, assignee: create(:user) } | 159 | let(:merge_request) { create :merge_request, assignee: create(:user) } |
| 159 | 160 | ||
| 160 | before do | 161 | before do |
| 161 | - build_team(merge_request.source_project) | ||
| 162 | build_team(merge_request.target_project) | 162 | build_team(merge_request.target_project) |
| 163 | end | 163 | end |
| 164 | 164 | ||
| @@ -235,16 +235,11 @@ describe NotificationService do | @@ -235,16 +235,11 @@ describe NotificationService do | ||
| 235 | end | 235 | end |
| 236 | end | 236 | end |
| 237 | 237 | ||
| 238 | - let(:u_watcher) { create(:user, notification_level: Notification::N_WATCH) } | ||
| 239 | - let(:u_participating) { create(:user, notification_level: Notification::N_PARTICIPATING) } | ||
| 240 | - let(:u_disabled) { create(:user, notification_level: Notification::N_DISABLED) } | ||
| 241 | - let(:u_mentioned) { create(:user, username: 'mention', notification_level: Notification::N_WATCH) } | ||
| 242 | - | ||
| 243 | def build_team(project) | 238 | def build_team(project) |
| 244 | - @u_watcher = u_watcher | ||
| 245 | - @u_participating = u_participating | ||
| 246 | - @u_disabled = u_disabled | ||
| 247 | - @u_mentioned = u_mentioned | 239 | + @u_watcher = create(:user, notification_level: Notification::N_WATCH) |
| 240 | + @u_participating = create(:user, notification_level: Notification::N_PARTICIPATING) | ||
| 241 | + @u_disabled = create(:user, notification_level: Notification::N_DISABLED) | ||
| 242 | + @u_mentioned = create(:user, username: 'mention', notification_level: Notification::N_PARTICIPATING) | ||
| 248 | 243 | ||
| 249 | project.team << [@u_watcher, :master] | 244 | project.team << [@u_watcher, :master] |
| 250 | project.team << [@u_participating, :master] | 245 | project.team << [@u_participating, :master] |