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
Tatuya Kamada
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
spec/lib/gitlab/ci/status/pipeline/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