BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
42806167
Commit
42806167
authored
Nov 18, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for key/deploy key notifications
parent
a41ee7eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
deploy_key_spec.rb
spec/models/deploy_key_spec.rb
+12
-0
key_spec.rb
spec/models/key_spec.rb
+12
-0
No files found.
spec/models/deploy_key_spec.rb
View file @
42806167
...
...
@@ -5,4 +5,16 @@ describe DeployKey, models: true do
it
{
is_expected
.
to
have_many
(
:deploy_keys_projects
)
}
it
{
is_expected
.
to
have_many
(
:projects
)
}
end
describe
'notification'
do
let
(
:user
)
{
create
(
:user
)
}
it
'does not send a notification'
do
perform_enqueued_jobs
do
create
(
:deploy_key
,
user:
user
)
end
should_not_email
(
user
)
end
end
end
spec/models/key_spec.rb
View file @
42806167
...
...
@@ -92,4 +92,16 @@ describe Key, models: true do
expect
(
described_class
.
new
(
key:
"
#{
valid_key
}
"
).
key
).
to
eq
(
valid_key
)
end
end
describe
'notification'
do
let
(
:user
)
{
create
(
:user
)
}
it
'sends a notification'
do
perform_enqueued_jobs
do
create
(
:key
,
user:
user
)
end
should_email
(
user
)
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