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
Jérome Perrin
gitlab-ce
Commits
48ea1428
Commit
48ea1428
authored
Dec 12, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pipeline specs for detailed statuses
[ci skip]
parent
ab37be2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+12
-8
No files found.
spec/models/ci/pipeline_spec.rb
View file @
48ea1428
...
...
@@ -442,11 +442,15 @@ describe Ci::Pipeline, models: true do
end
describe
'#detailed_status'
do
let
(
:user
)
{
create
(
:user
)
}
subject
{
pipeline
.
detailed_status
(
user
)
}
context
'when pipeline is created'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
status: :created
)
}
it
'returns detailed status for created pipeline'
do
expect
(
pipeline
.
detailed_status
.
text
).
to
eq
'created'
expect
(
subject
.
text
).
to
eq
'created'
end
end
...
...
@@ -454,7 +458,7 @@ describe Ci::Pipeline, models: true do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
status: :pending
)
}
it
'returns detailed status for pending pipeline'
do
expect
(
pipeline
.
detailed_status
.
text
).
to
eq
'pending'
expect
(
subject
.
text
).
to
eq
'pending'
end
end
...
...
@@ -462,7 +466,7 @@ describe Ci::Pipeline, models: true do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
status: :running
)
}
it
'returns detailed status for running pipeline'
do
expect
(
pipeline
.
detailed_status
.
text
).
to
eq
'running'
expect
(
subject
.
text
).
to
eq
'running'
end
end
...
...
@@ -470,7 +474,7 @@ describe Ci::Pipeline, models: true do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
status: :success
)
}
it
'returns detailed status for successful pipeline'
do
expect
(
pipeline
.
detailed_status
.
text
).
to
eq
'passed'
expect
(
subject
.
text
).
to
eq
'passed'
end
end
...
...
@@ -478,7 +482,7 @@ describe Ci::Pipeline, models: true do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
status: :failed
)
}
it
'returns detailed status for failed pipeline'
do
expect
(
pipeline
.
detailed_status
.
text
).
to
eq
'failed'
expect
(
subject
.
text
).
to
eq
'failed'
end
end
...
...
@@ -486,7 +490,7 @@ describe Ci::Pipeline, models: true do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
status: :canceled
)
}
it
'returns detailed status for canceled pipeline'
do
expect
(
pipeline
.
detailed_status
.
text
).
to
eq
'canceled'
expect
(
subject
.
text
).
to
eq
'canceled'
end
end
...
...
@@ -494,7 +498,7 @@ describe Ci::Pipeline, models: true do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
status: :skipped
)
}
it
'returns detailed status for skipped pipeline'
do
expect
(
pipeline
.
detailed_status
.
text
).
to
eq
'skipped'
expect
(
subject
.
text
).
to
eq
'skipped'
end
end
...
...
@@ -506,7 +510,7 @@ describe Ci::Pipeline, models: true do
end
it
'retruns detailed status for successful pipeline with warnings'
do
expect
(
pipeline
.
detailed_status
.
label
).
to
eq
'passed with warnings'
expect
(
subject
.
label
).
to
eq
'passed with warnings'
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