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
Boxiang Sun
gitlab-ce
Commits
ddcb8c88
Commit
ddcb8c88
authored
Sep 13, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix styling
parent
af7d3836
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
spec/models/commit_status_spec.rb
spec/models/commit_status_spec.rb
+7
-7
No files found.
spec/models/commit_status_spec.rb
View file @
ddcb8c88
...
@@ -40,7 +40,7 @@ describe CommitStatus, models: true do
...
@@ -40,7 +40,7 @@ describe CommitStatus, models: true do
it
{
is_expected
.
to
be_falsey
}
it
{
is_expected
.
to
be_falsey
}
end
end
%w
(running success failed)
.
each
do
|
status
|
%w
[running success failed]
.
each
do
|
status
|
context
"if commit status is
#{
status
}
"
do
context
"if commit status is
#{
status
}
"
do
before
{
commit_status
.
status
=
status
}
before
{
commit_status
.
status
=
status
}
...
@@ -48,7 +48,7 @@ describe CommitStatus, models: true do
...
@@ -48,7 +48,7 @@ describe CommitStatus, models: true do
end
end
end
end
%w
(pending canceled)
.
each
do
|
status
|
%w
[pending canceled]
.
each
do
|
status
|
context
"if commit status is
#{
status
}
"
do
context
"if commit status is
#{
status
}
"
do
before
{
commit_status
.
status
=
status
}
before
{
commit_status
.
status
=
status
}
...
@@ -60,7 +60,7 @@ describe CommitStatus, models: true do
...
@@ -60,7 +60,7 @@ describe CommitStatus, models: true do
describe
'#active?'
do
describe
'#active?'
do
subject
{
commit_status
.
active?
}
subject
{
commit_status
.
active?
}
%w
(pending running)
.
each
do
|
state
|
%w
[pending running]
.
each
do
|
state
|
context
"if commit_status.status is
#{
state
}
"
do
context
"if commit_status.status is
#{
state
}
"
do
before
{
commit_status
.
status
=
state
}
before
{
commit_status
.
status
=
state
}
...
@@ -68,7 +68,7 @@ describe CommitStatus, models: true do
...
@@ -68,7 +68,7 @@ describe CommitStatus, models: true do
end
end
end
end
%w
(success failed canceled)
.
each
do
|
state
|
%w
[success failed canceled]
.
each
do
|
state
|
context
"if commit_status.status is
#{
state
}
"
do
context
"if commit_status.status is
#{
state
}
"
do
before
{
commit_status
.
status
=
state
}
before
{
commit_status
.
status
=
state
}
...
@@ -80,7 +80,7 @@ describe CommitStatus, models: true do
...
@@ -80,7 +80,7 @@ describe CommitStatus, models: true do
describe
'#complete?'
do
describe
'#complete?'
do
subject
{
commit_status
.
complete?
}
subject
{
commit_status
.
complete?
}
%w
(success failed canceled)
.
each
do
|
state
|
%w
[success failed canceled]
.
each
do
|
state
|
context
"if commit_status.status is
#{
state
}
"
do
context
"if commit_status.status is
#{
state
}
"
do
before
{
commit_status
.
status
=
state
}
before
{
commit_status
.
status
=
state
}
...
@@ -88,7 +88,7 @@ describe CommitStatus, models: true do
...
@@ -88,7 +88,7 @@ describe CommitStatus, models: true do
end
end
end
end
%w
(pending running)
.
each
do
|
state
|
%w
[pending running]
.
each
do
|
state
|
context
"if commit_status.status is
#{
state
}
"
do
context
"if commit_status.status is
#{
state
}
"
do
before
{
commit_status
.
status
=
state
}
before
{
commit_status
.
status
=
state
}
...
@@ -187,7 +187,7 @@ describe CommitStatus, models: true do
...
@@ -187,7 +187,7 @@ describe CommitStatus, models: true do
subject
{
CommitStatus
.
where
(
pipeline:
pipeline
).
stages
}
subject
{
CommitStatus
.
where
(
pipeline:
pipeline
).
stages
}
it
'returns ordered list of stages'
do
it
'returns ordered list of stages'
do
is_expected
.
to
eq
(
%w
(build test deploy)
)
is_expected
.
to
eq
(
%w
[build test deploy]
)
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