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
33c88f5e
Commit
33c88f5e
authored
Oct 11, 2018
by
JB Vasseur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
6dd4ae0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
spec/requests/api/applications_spec.rb
spec/requests/api/applications_spec.rb
+7
-5
No files found.
spec/requests/api/applications_spec.rb
View file @
33c88f5e
...
...
@@ -88,7 +88,7 @@ describe API::Applications, :api do
describe
'GET /applications'
do
context
'authenticated and authorized user'
do
it
'can list application'
do
get
api
(
'/applications'
)
get
api
(
'/applications'
,
admin_user
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
).
to
be_a
(
Array
)
...
...
@@ -97,7 +97,7 @@ describe API::Applications, :api do
context
'non-authenticated user'
do
it
'cannot list application'
do
get
api
(
'/applications'
)
get
api
(
'/applications'
,
user
)
expect
(
response
).
to
have_http_status
401
end
...
...
@@ -107,15 +107,17 @@ describe API::Applications, :api do
describe
'DELETE /applications/:id'
do
context
'authenticated and authorized user'
do
it
'can delete an application'
do
delete
api
(
"/applications/
#{
application
.
id
}
"
)
expect
do
delete
api
(
"/applications/
#{
application
.
id
}
"
,
admin_user
)
end
.
to
change
{
Doorkeeper
::
Application
.
count
}.
by
-
1
expect
(
response
).
to
have_gitlab_http_status
(
204
)
end
end
context
'non-authenticated user'
do
it
'cannot delete an application'
do
delete
api
(
"/applications/
#{
application
.
id
}
"
)
delete
api
(
"/applications/
#{
application
.
id
}
"
,
user
)
expect
(
response
).
to
have_http_status
401
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