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
Léo-Paul Géneau
gitlab-ce
Commits
943b3d0e
Commit
943b3d0e
authored
Dec 02, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement the rest of core CI statuses with specs
parent
d4ed5b2e
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
160 additions
and
8 deletions
+160
-8
lib/gitlab/ci/status/core/base.rb
lib/gitlab/ci/status/core/base.rb
+4
-0
lib/gitlab/ci/status/core/canceled.rb
lib/gitlab/ci/status/core/canceled.rb
+8
-1
lib/gitlab/ci/status/core/created.rb
lib/gitlab/ci/status/core/created.rb
+8
-1
lib/gitlab/ci/status/core/failed.rb
lib/gitlab/ci/status/core/failed.rb
+8
-1
lib/gitlab/ci/status/core/pending.rb
lib/gitlab/ci/status/core/pending.rb
+8
-1
lib/gitlab/ci/status/core/running.rb
lib/gitlab/ci/status/core/running.rb
+8
-1
lib/gitlab/ci/status/core/skipped.rb
lib/gitlab/ci/status/core/skipped.rb
+8
-1
lib/gitlab/ci/status/core/success.rb
lib/gitlab/ci/status/core/success.rb
+1
-1
spec/lib/gitlab/ci/status/core/canceled_spec.rb
spec/lib/gitlab/ci/status/core/canceled_spec.rb
+17
-0
spec/lib/gitlab/ci/status/core/created_spec.rb
spec/lib/gitlab/ci/status/core/created_spec.rb
+17
-0
spec/lib/gitlab/ci/status/core/failed_spec.rb
spec/lib/gitlab/ci/status/core/failed_spec.rb
+17
-0
spec/lib/gitlab/ci/status/core/pending_spec.rb
spec/lib/gitlab/ci/status/core/pending_spec.rb
+17
-0
spec/lib/gitlab/ci/status/core/running_spec.rb
spec/lib/gitlab/ci/status/core/running_spec.rb
+17
-0
spec/lib/gitlab/ci/status/core/skipped_spec.rb
spec/lib/gitlab/ci/status/core/skipped_spec.rb
+17
-0
spec/lib/gitlab/ci/status/core/success_spec.rb
spec/lib/gitlab/ci/status/core/success_spec.rb
+5
-1
No files found.
lib/gitlab/ci/status/core/base.rb
View file @
943b3d0e
...
@@ -16,6 +16,10 @@ module Gitlab::Ci
...
@@ -16,6 +16,10 @@ module Gitlab::Ci
raise
NotImplementedError
raise
NotImplementedError
end
end
def
title
"
#{
@subject
.
class
.
name
.
demodulize
}
:
#{
label
}
"
end
def
has_details?
def
has_details?
raise
NotImplementedError
raise
NotImplementedError
end
end
...
...
lib/gitlab/ci/status/core/canceled.rb
View file @
943b3d0e
module
Gitlab::Ci
module
Gitlab::Ci
module
Status
module
Status
module
Core
module
Core
class
Canceled
class
Canceled
<
Core
::
Base
def
label
'canceled'
end
def
icon
'icon_status_canceled'
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/core/created.rb
View file @
943b3d0e
module
Gitlab::Ci
module
Gitlab::Ci
module
Status
module
Status
module
Core
module
Core
class
Created
class
Created
<
Core
::
Base
def
label
'created'
end
def
icon
'icon_status_created'
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/core/failed.rb
View file @
943b3d0e
module
Gitlab::Ci
module
Gitlab::Ci
module
Status
module
Status
module
Core
module
Core
class
Failed
class
Failed
<
Core
::
Base
def
label
'failed'
end
def
icon
'icon_status_failed'
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/core/pending.rb
View file @
943b3d0e
module
Gitlab::Ci
module
Gitlab::Ci
module
Status
module
Status
module
Core
module
Core
class
Pending
class
Pending
<
Core
::
Base
def
label
'pending'
end
def
icon
'icon_status_pending'
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/core/running.rb
View file @
943b3d0e
module
Gitlab::Ci
module
Gitlab::Ci
module
Status
module
Status
module
Core
module
Core
class
Running
class
Running
<
Core
::
Base
def
label
'running'
end
def
icon
'icon_status_running'
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/core/skipped.rb
View file @
943b3d0e
module
Gitlab::Ci
module
Gitlab::Ci
module
Status
module
Status
module
Core
module
Core
class
Skipped
class
Skipped
<
Core
::
Base
def
label
'skipped'
end
def
icon
'icon_status_skipped'
end
end
end
end
end
end
end
...
...
lib/gitlab/ci/status/core/success.rb
View file @
943b3d0e
...
@@ -7,7 +7,7 @@ module Gitlab::Ci
...
@@ -7,7 +7,7 @@ module Gitlab::Ci
end
end
def
icon
def
icon
'success'
'
icon_status_
success'
end
end
end
end
end
end
...
...
spec/lib/gitlab/ci/status/core/canceled_spec.rb
0 → 100644
View file @
943b3d0e
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Canceled
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#label'
do
it
{
expect
(
subject
.
label
).
to
eq
'canceled'
}
end
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_canceled'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: canceled'
}
end
end
spec/lib/gitlab/ci/status/core/created_spec.rb
0 → 100644
View file @
943b3d0e
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Created
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#label'
do
it
{
expect
(
subject
.
label
).
to
eq
'created'
}
end
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_created'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: created'
}
end
end
spec/lib/gitlab/ci/status/core/failed_spec.rb
0 → 100644
View file @
943b3d0e
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Failed
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#label'
do
it
{
expect
(
subject
.
label
).
to
eq
'failed'
}
end
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_failed'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: failed'
}
end
end
spec/lib/gitlab/ci/status/core/pending_spec.rb
0 → 100644
View file @
943b3d0e
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Pending
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#label'
do
it
{
expect
(
subject
.
label
).
to
eq
'pending'
}
end
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_pending'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: pending'
}
end
end
spec/lib/gitlab/ci/status/core/running_spec.rb
0 → 100644
View file @
943b3d0e
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Running
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#label'
do
it
{
expect
(
subject
.
label
).
to
eq
'running'
}
end
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_running'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: running'
}
end
end
spec/lib/gitlab/ci/status/core/skipped_spec.rb
0 → 100644
View file @
943b3d0e
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Core
::
Skipped
do
subject
{
described_class
.
new
(
double
(
'subject'
))
}
describe
'#label'
do
it
{
expect
(
subject
.
label
).
to
eq
'skipped'
}
end
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_skipped'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: skipped'
}
end
end
spec/lib/gitlab/ci/status/core/success_spec.rb
View file @
943b3d0e
...
@@ -8,6 +8,10 @@ describe Gitlab::Ci::Status::Core::Success do
...
@@ -8,6 +8,10 @@ describe Gitlab::Ci::Status::Core::Success do
end
end
describe
'#icon'
do
describe
'#icon'
do
it
{
expect
(
subject
.
icon
).
to
eq
'success'
}
it
{
expect
(
subject
.
icon
).
to
eq
'icon_status_success'
}
end
describe
'#title'
do
it
{
expect
(
subject
.
title
).
to
eq
'Double: passed'
}
end
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