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
68677bcd
Commit
68677bcd
authored
May 24, 2019
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move ee-specific parts from Admin::ApplicationsController
parent
16f7bf44
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
ee/spec/controllers/admin/applications_controller_spec.rb
ee/spec/controllers/admin/applications_controller_spec.rb
+24
-0
spec/controllers/admin/applications_controller_spec.rb
spec/controllers/admin/applications_controller_spec.rb
+0
-3
No files found.
ee/spec/controllers/admin/applications_controller_spec.rb
0 → 100644
View file @
68677bcd
# frozen_string_literal: true
require
'spec_helper'
describe
Admin
::
ApplicationsController
do
let
(
:admin
)
{
create
(
:admin
)
}
let
(
:application
)
{
create
(
:oauth_application
,
owner_id:
nil
,
owner_type:
nil
)
}
before
do
sign_in
(
admin
)
end
describe
'POST #create'
do
it
'creates the application'
do
stub_licensed_features
(
extended_audit_events:
true
)
create_params
=
attributes_for
(
:application
,
trusted:
true
)
expect
do
post
:create
,
params:
{
doorkeeper_application:
create_params
}
end
.
to
change
{
SecurityEvent
.
count
}.
by
(
1
)
end
end
end
spec/controllers/admin/applications_controller_spec.rb
View file @
68677bcd
...
@@ -30,8 +30,6 @@ describe Admin::ApplicationsController do
...
@@ -30,8 +30,6 @@ 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
...
@@ -42,7 +40,6 @@ describe Admin::ApplicationsController do
...
@@ -42,7 +40,6 @@ describe Admin::ApplicationsController do
expect
(
response
).
to
redirect_to
(
admin_application_path
(
application
))
expect
(
response
).
to
redirect_to
(
admin_application_path
(
application
))
expect
(
application
).
to
have_attributes
(
create_params
.
except
(
:uid
,
:owner_type
))
expect
(
application
).
to
have_attributes
(
create_params
.
except
(
:uid
,
:owner_type
))
expect
(
SecurityEvent
.
count
).
to
eq
(
1
)
end
end
it
'renders the application form on errors'
do
it
'renders the application form on errors'
do
...
...
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