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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2ee6f60a
Commit
2ee6f60a
authored
Sep 19, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix specs
parent
475ab94e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
0 deletions
+14
-0
spec/controllers/admin/applications_controller_spec.rb
spec/controllers/admin/applications_controller_spec.rb
+2
-0
spec/controllers/oauth/applications_controller_spec.rb
spec/controllers/oauth/applications_controller_spec.rb
+2
-0
spec/controllers/profiles/keys_controller_spec.rb
spec/controllers/profiles/keys_controller_spec.rb
+2
-0
spec/services/emails/create_service_spec.rb
spec/services/emails/create_service_spec.rb
+4
-0
spec/services/emails/destroy_service_spec.rb
spec/services/emails/destroy_service_spec.rb
+4
-0
No files found.
spec/controllers/admin/applications_controller_spec.rb
View file @
2ee6f60a
...
@@ -28,6 +28,8 @@ describe Admin::ApplicationsController do
...
@@ -28,6 +28,8 @@ describe Admin::ApplicationsController do
describe
'POST #create'
do
describe
'POST #create'
do
it
'creates the application'
do
it
'creates the application'
do
stub_licensed_features
(
extended_audit_events:
true
)
create_params
=
attributes_for
(
:application
,
trusted:
true
)
create_params
=
attributes_for
(
:application
,
trusted:
true
)
expect
do
expect
do
...
...
spec/controllers/oauth/applications_controller_spec.rb
View file @
2ee6f60a
...
@@ -28,6 +28,8 @@ describe Oauth::ApplicationsController do
...
@@ -28,6 +28,8 @@ describe Oauth::ApplicationsController do
describe
'POST #create'
do
describe
'POST #create'
do
it
'logs the audit event'
do
it
'logs the audit event'
do
stub_licensed_features
(
extended_audit_events:
true
)
sign_in
(
user
)
sign_in
(
user
)
application
=
build
(
:oauth_application
)
application
=
build
(
:oauth_application
)
...
...
spec/controllers/profiles/keys_controller_spec.rb
View file @
2ee6f60a
...
@@ -69,6 +69,8 @@ describe Profiles::KeysController do
...
@@ -69,6 +69,8 @@ describe Profiles::KeysController do
describe
'#create'
do
describe
'#create'
do
it
'logs the audit event'
do
it
'logs the audit event'
do
stub_licensed_features
(
extended_audit_events:
true
)
sign_in
(
user
)
sign_in
(
user
)
key
=
build
(
:key
)
key
=
build
(
:key
)
...
...
spec/services/emails/create_service_spec.rb
View file @
2ee6f60a
...
@@ -7,6 +7,10 @@ describe Emails::CreateService do
...
@@ -7,6 +7,10 @@ describe Emails::CreateService do
subject
(
:service
)
{
described_class
.
new
(
user
,
user
,
opts
)
}
subject
(
:service
)
{
described_class
.
new
(
user
,
user
,
opts
)
}
describe
'#execute'
do
describe
'#execute'
do
before
do
stub_licensed_features
(
extended_audit_events:
true
)
end
it
'creates an email with valid attributes'
do
it
'creates an email with valid attributes'
do
expect
{
service
.
execute
}.
to
change
{
Email
.
count
}.
by
(
1
)
expect
{
service
.
execute
}.
to
change
{
Email
.
count
}.
by
(
1
)
expect
(
Email
.
where
(
opts
)).
not_to
be_empty
expect
(
Email
.
where
(
opts
)).
not_to
be_empty
...
...
spec/services/emails/destroy_service_spec.rb
View file @
2ee6f60a
...
@@ -6,6 +6,10 @@ describe Emails::DestroyService do
...
@@ -6,6 +6,10 @@ describe Emails::DestroyService do
subject
(
:service
)
{
described_class
.
new
(
user
,
user
,
email:
email
.
email
)
}
subject
(
:service
)
{
described_class
.
new
(
user
,
user
,
email:
email
.
email
)
}
before
do
stub_licensed_features
(
extended_audit_events:
true
)
end
describe
'#execute'
do
describe
'#execute'
do
it
'removes an email'
do
it
'removes an email'
do
expect
{
service
.
execute
}.
to
change
{
user
.
emails
.
count
}.
by
(
-
1
)
expect
{
service
.
execute
}.
to
change
{
user
.
emails
.
count
}.
by
(
-
1
)
...
...
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