BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
63bb8491
Commit
63bb8491
authored
Dec 21, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add controller specs for pipeline index API endpoint
[ci skip]
parent
02c7dcf6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
pipelines_controller_spec.rb
spec/controllers/projects/pipelines_controller_spec.rb
+21
-1
No files found.
spec/controllers/projects/pipelines_controller_spec.rb
View file @
63bb8491
...
...
@@ -5,13 +5,33 @@ describe Projects::PipelinesController do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
before
do
sign_in
(
user
)
end
describe
'GET index.json'
do
before
do
create_list
(
:ci_empty_pipeline
,
2
,
project:
project
)
get
:index
,
namespace_id:
project
.
namespace
.
path
,
project_id:
project
.
path
,
format: :json
end
it
'returns JSON with serialized pipelines'
do
expect
(
response
).
to
have_http_status
(
:ok
)
expect
(
json_response
).
to
include
(
'pipelines'
)
expect
(
json_response
[
'pipelines'
].
count
).
to
eq
2
expect
(
json_response
[
'count'
][
'all'
]).
to
eq
2
expect
(
json_response
[
'count'
][
'running_or_pending'
]).
to
eq
2
end
end
describe
'GET stages.json'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
project:
project
)
}
context
'when accessing existing stage'
do
before
do
create
(
:ci_build
,
pipeline:
pipeline
,
stage:
'build'
)
...
...
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