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
Boxiang Sun
gitlab-ce
Commits
8a6e9b93
Commit
8a6e9b93
authored
Aug 16, 2016
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address minor review comments for tests
parent
6bf7b627
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
spec/services/issues/update_service_spec.rb
spec/services/issues/update_service_spec.rb
+3
-3
spec/services/merge_requests/update_service_spec.rb
spec/services/merge_requests/update_service_spec.rb
+4
-4
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+10
-10
No files found.
spec/services/issues/update_service_spec.rb
View file @
8a6e9b93
...
...
@@ -331,7 +331,7 @@ describe Issues::UpdateService, services: true do
perform_enqueued_jobs
{
update_issue
(
title:
user4
.
to_reference
)
}
end
it
"should email only the newly-mentioned user"
do
it
'emails only the newly-mentioned user'
do
should_not_email
(
user
)
should_not_email
(
user2
)
should_not_email
(
user3
)
...
...
@@ -339,12 +339,12 @@ describe Issues::UpdateService, services: true do
end
end
context
"in description"
do
context
'in description'
do
before
do
perform_enqueued_jobs
{
update_issue
(
description:
user4
.
to_reference
)
}
end
it
"should email only the newly-mentioned user"
do
it
'emails only the newly-mentioned user'
do
should_not_email
(
user
)
should_not_email
(
user2
)
should_not_email
(
user3
)
...
...
spec/services/merge_requests/update_service_spec.rb
View file @
8a6e9b93
...
...
@@ -232,12 +232,12 @@ describe MergeRequests::UpdateService, services: true do
project
.
team
<<
[
user4
,
:developer
]
end
context
"in title"
do
context
'in title'
do
before
do
perform_enqueued_jobs
{
update_merge_request
(
title:
user4
.
to_reference
)
}
end
it
"should email only the newly-mentioned user"
do
it
'emails only the newly-mentioned user'
do
should_not_email
(
user
)
should_not_email
(
user2
)
should_not_email
(
user3
)
...
...
@@ -245,12 +245,12 @@ describe MergeRequests::UpdateService, services: true do
end
end
context
"in description"
do
context
'in description'
do
before
do
perform_enqueued_jobs
{
update_merge_request
(
description:
user4
.
to_reference
)
}
end
it
"should email only the newly-mentioned user"
do
it
'emails only the newly-mentioned user'
do
should_not_email
(
user
)
should_not_email
(
user2
)
should_not_email
(
user3
)
...
...
spec/services/notification_service_spec.rb
View file @
8a6e9b93
...
...
@@ -405,12 +405,12 @@ describe NotificationService, services: true do
notification
.
new_mentions_in_issue
(
issue
,
new_mentions
,
@u_disabled
)
end
it
"should not email anyone unless they are newly mentioned"
do
it
'sends no emails when no new mentions are present'
do
send_notifications
expect
(
ActionMailer
::
Base
.
deliveries
).
to
eq
[]
expect
(
ActionMailer
::
Base
.
deliveries
).
to
be_empty
end
it
"should email new mentions with a watch level higher than participant"
do
it
'emails new mentions with a watch level higher than participant'
do
send_notifications
(
@u_watcher
,
@u_participant_mentioned
,
@u_custom_global
)
should_email
(
@u_watcher
)
...
...
@@ -420,9 +420,9 @@ describe NotificationService, services: true do
expect
(
ActionMailer
::
Base
.
deliveries
.
count
).
to
eq
3
end
it
"should not email new mentions with a watch level equal to or less than participant"
do
it
'does not email new mentions with a watch level equal to or less than participant'
do
send_notifications
(
@u_participating
,
@u_mentioned
)
expect
(
ActionMailer
::
Base
.
deliveries
).
to
eq
[]
expect
(
ActionMailer
::
Base
.
deliveries
).
to
be_empty
end
end
...
...
@@ -798,12 +798,12 @@ describe NotificationService, services: true do
notification
.
new_mentions_in_merge_request
(
merge_request
,
new_mentions
,
@u_disabled
)
end
it
"should not email anyone unless they are newly mentioned"
do
it
'sends no emails when there are no new mentions'
do
send_notifications
expect
(
ActionMailer
::
Base
.
deliveries
).
to
eq
[]
expect
(
ActionMailer
::
Base
.
deliveries
).
to
be_empty
end
it
"should email new mentions with a watch level higher than participant"
do
it
'emails new mentions with a watch level higher than participant'
do
send_notifications
(
@u_watcher
,
@u_participant_mentioned
,
@u_custom_global
)
should_email
(
@u_watcher
)
...
...
@@ -813,9 +813,9 @@ describe NotificationService, services: true do
expect
(
ActionMailer
::
Base
.
deliveries
.
count
).
to
eq
3
end
it
"should not email new mentions with a watch level equal to or less than participant"
do
it
'does not email new mentions with a watch level equal to or less than participant'
do
send_notifications
(
@u_participating
,
@u_mentioned
)
expect
(
ActionMailer
::
Base
.
deliveries
).
to
eq
[]
expect
(
ActionMailer
::
Base
.
deliveries
).
to
be_empty
end
end
...
...
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