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
02b5d359
Commit
02b5d359
authored
Aug 10, 2017
by
http://jneen.net/
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restructure the #new_key notification spec
parent
8f6205d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
spec/services/notification_service_spec.rb
spec/services/notification_service_spec.rb
+6
-11
No files found.
spec/services/notification_service_spec.rb
View file @
02b5d359
...
@@ -80,21 +80,16 @@ describe NotificationService, :mailer do
...
@@ -80,21 +80,16 @@ describe NotificationService, :mailer do
describe
'Keys'
do
describe
'Keys'
do
describe
'#new_key'
do
describe
'#new_key'
do
let!
(
:key
)
{
create
(
:personal_key
)
}
let
(
:key_options
)
{
{}
}
let!
(
:key
)
{
create
(
:personal_key
,
key_options
)
}
it
{
expect
(
notification
.
new_key
(
key
)).
to
be_truthy
}
it
{
expect
(
notification
.
new_key
(
key
)).
to
be_truthy
}
it
{
should_email
(
key
.
user
)
}
it
'sends email to key owner'
do
describe
'never emails the ghost user'
do
expect
{
notification
.
new_key
(
key
)
}.
to
change
{
ActionMailer
::
Base
.
deliveries
.
size
}.
by
(
1
)
let
(
:key_options
)
{
{
user:
User
.
ghost
}
}
end
it
'never emails the ghost user'
do
key
.
user
=
User
.
ghost
reset_delivered_emails!
notification
.
new_key
(
key
)
should_not_email_anyone
it
{
should_not_email_anyone
}
end
end
end
end
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