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
9fb5c1bd
Commit
9fb5c1bd
authored
Nov 02, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor and add more specs
parent
95c29671
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
+29
-6
spec/ee/spec/services/ee/applications/create_service_spec.rb
spec/ee/spec/services/ee/applications/create_service_spec.rb
+15
-0
spec/ee/spec/services/ee/keys/create_service_spec.rb
spec/ee/spec/services/ee/keys/create_service_spec.rb
+14
-0
spec/services/applications/create_service_spec.rb
spec/services/applications/create_service_spec.rb
+0
-6
No files found.
spec/ee/spec/services/ee/applications/create_service_spec.rb
0 → 100644
View file @
9fb5c1bd
require
'spec_helper'
describe
::
Applications
::
CreateService
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:params
)
{
attributes_for
(
:application
)
}
let
(
:request
)
{
ActionController
::
TestRequest
.
new
(
remote_ip:
'127.0.0.1'
)
}
subject
{
described_class
.
new
(
user
,
params
)
}
it
'creates an audit log'
do
stub_licensed_features
(
extended_audit_events:
true
)
expect
{
subject
.
execute
(
request
)
}.
to
change
{
SecurityEvent
.
count
}.
by
(
1
)
end
end
spec/ee/spec/services/ee/keys/create_service_spec.rb
0 → 100644
View file @
9fb5c1bd
require
'spec_helper'
describe
Keys
::
CreateService
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:params
)
{
attributes_for
(
:key
)
}
subject
{
described_class
.
new
(
user
,
params
)
}
it
'creates'
do
stub_licensed_features
(
extended_audit_events:
true
)
expect
{
subject
.
execute
}.
to
change
{
SecurityEvent
.
count
}.
by
(
1
)
end
end
spec/services/applications/create_service_spec.rb
View file @
9fb5c1bd
...
...
@@ -10,10 +10,4 @@ describe ::Applications::CreateService do
it
'creates an application'
do
expect
{
subject
.
execute
(
request
)
}.
to
change
{
Doorkeeper
::
Application
.
count
}.
by
(
1
)
end
it
'creates an audit log'
do
stub_licensed_features
(
extended_audit_events:
true
)
expect
{
subject
.
execute
(
request
)
}.
to
change
{
SecurityEvent
.
count
}.
by
(
1
)
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