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:
authorhttp://jneen.net/ <jneen@jneen.net>2017-08-04 21:54:19 +0300
committerhttp://jneen.net/ <jneen@jneen.net>2017-08-12 02:02:03 +0300
commit0268fc2ffc7cdc12a6e1a0bf565fe70ff8541398 (patch)
treeff0553523c5344695453e1b3e583ba265dccfb39 /spec
parentd5054abfcc1b27c664bff46ae6dc1482c591e5a9 (diff)
check notifiability for more emails
Diffstat (limited to 'spec')
-rw-r--r--spec/services/notification_service_spec.rb36
1 files changed, 28 insertions, 8 deletions
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index 64981c199e4..b6110da83b5 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -1173,19 +1173,39 @@ describe NotificationService, :mailer do
end
end
- describe '#project_exported' do
- it do
- notification.project_exported(project, @u_disabled)
+ context 'user with notifications disabled' do
+ describe '#project_exported' do
+ it do
+ notification.project_exported(project, @u_disabled)
+
+ should_not_email_anyone
+ end
+ end
+
+ describe '#project_not_exported' do
+ it do
+ notification.project_not_exported(project, @u_disabled, ['error'])
- should_only_email(@u_disabled)
+ should_not_email_anyone
+ end
end
end
- describe '#project_not_exported' do
- it do
- notification.project_not_exported(project, @u_disabled, ['error'])
+ context 'user with notifications enabled' do
+ describe '#project_exported' do
+ it do
+ notification.project_exported(project, @u_participating)
+
+ should_only_email(@u_participating)
+ end
+ end
+
+ describe '#project_not_exported' do
+ it do
+ notification.project_not_exported(project, @u_participating, ['error'])
- should_only_email(@u_disabled)
+ should_only_email(@u_participating)
+ end
end
end
end