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:
authorFelipe Artur <felipefac@gmail.com>2016-06-09 22:33:31 +0300
committerFelipe Artur <felipefac@gmail.com>2016-06-10 17:49:30 +0300
commit39ead205de72461e86db07525922f2fab5fff2a9 (patch)
tree5336487bad3b89b5db461788aba9eb7d4b9c3b0f /spec
parent8f6d43e0fea3ce62ec2e8e211755e557f19c51fd (diff)
Remove notification level fild from users, improve migrations and specs
Diffstat (limited to 'spec')
-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]