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
Léo-Paul Géneau
gitlab-ce
Commits
4f3dc19a
Commit
4f3dc19a
authored
May 04, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for new pipeline action for JSON format
parent
c68bf432
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
spec/controllers/projects/pipelines_controller_spec.rb
spec/controllers/projects/pipelines_controller_spec.rb
+36
-0
No files found.
spec/controllers/projects/pipelines_controller_spec.rb
View file @
4f3dc19a
...
@@ -5,6 +5,8 @@ describe Projects::PipelinesController do
...
@@ -5,6 +5,8 @@ describe Projects::PipelinesController do
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
before
do
before
do
project
.
add_developer
(
user
)
sign_in
(
user
)
sign_in
(
user
)
end
end
...
@@ -87,4 +89,38 @@ describe Projects::PipelinesController do
...
@@ -87,4 +89,38 @@ describe Projects::PipelinesController do
expect
(
json_response
[
'favicon'
]).
to
eq
"/assets/ci_favicons/
#{
status
.
favicon
}
.ico"
expect
(
json_response
[
'favicon'
]).
to
eq
"/assets/ci_favicons/
#{
status
.
favicon
}
.ico"
end
end
end
end
describe
'POST retry.json'
do
let!
(
:pipeline
)
{
create
(
:ci_pipeline
,
:failed
,
project:
project
)
}
let!
(
:build
)
{
create
(
:ci_build
,
:failed
,
pipeline:
pipeline
)
}
before
do
post
:retry
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
pipeline
.
id
,
format: :json
end
it
'retries a pipeline without returning any content'
do
expect
(
response
).
to
have_http_status
(
:no_content
)
expect
(
build
.
reload
).
to
be_retried
end
end
describe
'POST cancel.json'
do
let!
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
let!
(
:build
)
{
create
(
:ci_build
,
:running
,
pipeline:
pipeline
)
}
before
do
post
:cancel
,
namespace_id:
project
.
namespace
,
project_id:
project
,
id:
pipeline
.
id
,
format: :json
end
it
'cancels a pipeline without returning any content'
do
expect
(
response
).
to
have_http_status
(
:no_content
)
expect
(
pipeline
.
reload
).
to
be_canceled
end
end
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