summaryrefslogtreecommitdiff
path: root/spec/services/notification_service_spec.rb
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-06-09 16:33:31 -0300
committerFelipe Artur <felipefac@gmail.com>2016-06-10 11:49:30 -0300
commit39ead205de72461e86db07525922f2fab5fff2a9 (patch)
tree5336487bad3b89b5db461788aba9eb7d4b9c3b0f /spec/services/notification_service_spec.rb
parent8f6d43e0fea3ce62ec2e8e211755e557f19c51fd (diff)
downloadgitlab-ce-39ead205de72461e86db07525922f2fab5fff2a9.tar.gz
Remove notification level fild from users, improve migrations and specsissue_3359_2
Diffstat (limited to 'spec/services/notification_service_spec.rb')
-rw-r--r--spec/services/notification_service_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index 5a9a9d62a15..b99e02ba678 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -85,13 +85,14 @@ describe NotificationService, services: true do
context 'participating' do
context 'by note' do
before do
+ ActionMailer::Base.deliveries.clear
note.author = @u_lazy_participant
note.save
notification.new_note(note)
end
- it { should_email(@u_lazy_participant) }
+ it { should_not_email(@u_lazy_participant) }
end
end
end
@@ -953,8 +954,8 @@ describe NotificationService, services: true do
def add_users_with_subscription(project, issuable)
@subscriber = create :user
@unsubscriber = create :user
- @subscribed_participant = create(:user, username: 'subscribed_participant', notification_level: :participating)
- @watcher_and_subscriber = create(:user, notification_level: :watch)
+ @subscribed_participant = create_global_setting_for(create(:user, username: 'subscribed_participant'), :participating)
+ @watcher_and_subscriber = create_global_setting_for(create(:user), :watch)
project.team << [@subscribed_participant, :master]
project.team << [@subscriber, :master]