Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
4c68ff08
Commit
4c68ff08
authored
Aug 18, 2017
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a spec for a participant with a :custom setting
where that custom setting is not enabled.
parent
539ed0a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+14
-2
No files found.
spec/services/notification_service_spec.rb
View file @
4c68ff08
...
...
@@ -130,7 +130,18 @@ describe NotificationService, :mailer do
project
.
add_master
(
issue
.
author
)
project
.
add_master
(
assignee
)
project
.
add_master
(
note
.
author
)
create
(
:note_on_issue
,
noteable:
issue
,
project_id:
issue
.
project_id
,
note:
'@subscribed_participant cc this guy'
)
@u_custom_off
=
create_user_with_notification
(
:custom
,
'custom_off'
)
project
.
add_guest
(
@u_custom_off
)
create
(
:note_on_issue
,
author:
@u_custom_off
,
noteable:
issue
,
project_id:
issue
.
project_id
,
note:
'i think @subscribed_participant should see this'
)
update_custom_notification
(
:new_note
,
@u_guest_custom
,
resource:
project
)
update_custom_notification
(
:new_note
,
@u_custom_global
)
end
...
...
@@ -141,7 +152,7 @@ describe NotificationService, :mailer do
reset_delivered_emails!
# Ensure create SentNotification by noteable = issue 6 times, not noteable = note
expect
(
SentNotification
).
to
receive
(
:record
).
with
(
issue
,
any_args
).
exactly
(
8
).
times
expect
(
SentNotification
).
to
receive
(
:record
).
with
(
issue
,
any_args
).
exactly
(
9
).
times
notification
.
new_note
(
note
)
...
...
@@ -153,6 +164,7 @@ describe NotificationService, :mailer do
should_email
(
@subscriber
)
should_email
(
@watcher_and_subscriber
)
should_email
(
@subscribed_participant
)
should_email
(
@u_custom_off
)
should_not_email
(
@u_guest_custom
)
should_not_email
(
@u_guest_watcher
)
should_not_email
(
note
.
author
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment