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
de605ad1
Commit
de605ad1
authored
Nov 13, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for Pipeline DELETE for developers
parent
b7e5f73c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
spec/requests/api/pipelines_spec.rb
spec/requests/api/pipelines_spec.rb
+21
-4
No files found.
spec/requests/api/pipelines_spec.rb
View file @
de605ad1
...
...
@@ -473,13 +473,30 @@ describe API::Pipelines do
end
context
'unauthorized user'
do
context
'when user is not member'
do
it
'should return a 404'
do
get
api
(
"/projects/
#{
project
.
id
}
/pipelines/
#{
pipeline
.
id
}
"
,
non_member
)
delete
api
(
"/projects/
#{
project
.
id
}
/pipelines/
#{
pipeline
.
id
}
"
,
non_member
)
expect
(
response
).
to
have_gitlab_http_status
(
404
)
expect
(
json_response
[
'message'
]).
to
eq
'404 Project Not Found'
end
end
context
'when user is developer'
do
let
(
:developer
)
{
create
(
:user
)
}
before
do
project
.
add_developer
(
developer
)
end
it
'should return a 403'
do
delete
api
(
"/projects/
#{
project
.
id
}
/pipelines/
#{
pipeline
.
id
}
"
,
developer
)
expect
(
response
).
to
have_gitlab_http_status
(
403
)
expect
(
json_response
[
'message'
]).
to
eq
'403 Forbidden'
end
end
end
end
describe
'POST /projects/:id/pipelines/:pipeline_id/retry'
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