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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
bb0483dc
Commit
bb0483dc
authored
Mar 28, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the empty state extended status to be the beginning
parent
d6509274
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
15 deletions
+17
-15
lib/gitlab/ci/status/build/factory.rb
lib/gitlab/ci/status/build/factory.rb
+7
-7
spec/lib/gitlab/ci/status/build/factory_spec.rb
spec/lib/gitlab/ci/status/build/factory_spec.rb
+10
-8
No files found.
lib/gitlab/ci/status/build/factory.rb
View file @
bb0483dc
...
...
@@ -4,17 +4,17 @@ module Gitlab
module
Build
class
Factory
<
Status
::
Factory
def
self
.
extended_statuses
[[
Status
::
Build
::
Cancelable
,
[[
Status
::
Build
::
Manual
,
Status
::
Build
::
Canceled
,
Status
::
Build
::
Created
,
Status
::
Build
::
Pending
,
Status
::
Build
::
Skipped
],
[
Status
::
Build
::
Cancelable
,
Status
::
Build
::
Retryable
],
[
Status
::
Build
::
FailedAllowed
,
Status
::
Build
::
Play
,
Status
::
Build
::
Stop
],
[
Status
::
Build
::
Action
],
[
Status
::
Build
::
Manual
,
Status
::
Build
::
Canceled
,
Status
::
Build
::
Created
,
Status
::
Build
::
Pending
,
Status
::
Build
::
Skipped
]]
[
Status
::
Build
::
Action
]]
end
def
self
.
common_helpers
...
...
spec/lib/gitlab/ci/status/build/factory_spec.rb
View file @
bb0483dc
...
...
@@ -104,7 +104,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'matches correct extended statuses'
do
expect
(
factory
.
extended_statuses
)
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Build
::
Retryable
]
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Build
::
Canceled
,
Gitlab
::
Ci
::
Status
::
Build
::
Retryable
]
end
it
'fabricates a retryable build status'
do
...
...
@@ -157,7 +157,7 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'matches correct extended statuses'
do
expect
(
factory
.
extended_statuses
)
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Build
::
Cancelable
]
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Build
::
Pending
,
Gitlab
::
Ci
::
Status
::
Build
::
Cancelable
]
end
it
'fabricates a cancelable build status'
do
...
...
@@ -182,12 +182,12 @@ describe Gitlab::Ci::Status::Build::Factory do
expect
(
factory
.
core_status
).
to
be_a
Gitlab
::
Ci
::
Status
::
Skipped
end
it
'
does not match
extended statuses'
do
expect
(
factory
.
extended_statuses
).
to
be_empty
it
'
matches correct
extended statuses'
do
expect
(
factory
.
extended_statuses
).
to
eq
[
Gitlab
::
Ci
::
Status
::
Build
::
Skipped
]
end
it
'fabricates a
core skippe
d status'
do
expect
(
status
).
to
be_a
Gitlab
::
Ci
::
Status
::
Skipped
it
'fabricates a
skipped buil
d status'
do
expect
(
status
).
to
be_a
Gitlab
::
Ci
::
Status
::
Build
::
Skipped
end
it
'fabricates status with correct details'
do
...
...
@@ -211,7 +211,8 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'matches correct extended statuses'
do
expect
(
factory
.
extended_statuses
)
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Build
::
Play
,
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Build
::
Manual
,
Gitlab
::
Ci
::
Status
::
Build
::
Play
,
Gitlab
::
Ci
::
Status
::
Build
::
Action
]
end
...
...
@@ -259,7 +260,8 @@ describe Gitlab::Ci::Status::Build::Factory do
it
'matches correct extended statuses'
do
expect
(
factory
.
extended_statuses
)
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Build
::
Stop
,
.
to
eq
[
Gitlab
::
Ci
::
Status
::
Build
::
Manual
,
Gitlab
::
Ci
::
Status
::
Build
::
Stop
,
Gitlab
::
Ci
::
Status
::
Build
::
Action
]
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