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
b2ab11a9
Commit
b2ab11a9
authored
Dec 05, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend tests for pipeline status factory
parent
d28f5e77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
factory_spec.rb
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
+16
-3
No files found.
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
View file @
b2ab11a9
...
...
@@ -5,6 +5,10 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
described_class
.
new
(
pipeline
)
end
let
(
:status
)
do
subject
.
fabricate!
end
context
'when pipeline has a core status'
do
HasStatus
::
AVAILABLE_STATUSES
.
each
do
|
core_status
|
context
"when core status is
#{
core_status
}
"
do
...
...
@@ -13,8 +17,13 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
end
it
"fabricates a core status
#{
core_status
}
"
do
expect
(
subject
.
fabricate!
)
.
to
be_a
Gitlab
::
Ci
::
Status
.
const_get
(
core_status
.
capitalize
)
expect
(
status
).
to
be_a
(
Gitlab
::
Ci
::
Status
.
const_get
(
core_status
.
capitalize
))
end
it
'extends core status with common pipeline methods'
do
expect
(
status
).
to
have_details
expect
(
status
.
details_path
).
to
include
"pipelines/
#{
pipeline
.
id
}
"
end
end
end
...
...
@@ -30,8 +39,12 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
end
it
'fabricates extended "success with warnings" status'
do
expect
(
s
ubject
.
fabricate!
)
expect
(
s
tatus
)
.
to
be_a
Gitlab
::
Ci
::
Status
::
Pipeline
::
SuccessWithWarnings
end
it
'extends core status with common pipeline methods'
do
expect
(
status
).
to
have_details
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