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
065af93d
Commit
065af93d
authored
Nov 06, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec coding style
parent
060c5687
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
spec/models/environment_spec.rb
spec/models/environment_spec.rb
+1
-1
spec/models/environment_status_spec.rb
spec/models/environment_status_spec.rb
+11
-2
No files found.
spec/models/environment_spec.rb
View file @
065af93d
...
...
@@ -89,7 +89,7 @@ describe Environment do
context
'when the latest deployment is successful'
do
let!
(
:deployment
)
{
create
(
:deployment
,
:start
,
:success
,
environment:
environment
)
}
it
{
expect
(
subject
.
to_i
).
to
eq
(
deployment
.
finished_at
.
to_i
)
}
it
{
expect
(
subject
).
to
be_within
(
1
.
second
).
of
(
deployment
.
finished_at
)
}
end
context
'when the latest deployment failed'
do
...
...
spec/models/environment_status_spec.rb
View file @
065af93d
...
...
@@ -109,7 +109,11 @@ describe EnvironmentStatus do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
sha:
sha
,
project:
forked
)
}
let
(
:merge_request
)
do
create
(
:merge_request
,
source_project:
forked
,
target_project:
project
,
target_branch:
'master'
,
head_pipeline:
pipeline
)
create
(
:merge_request
,
source_project:
forked
,
target_project:
project
,
target_branch:
'master'
,
head_pipeline:
pipeline
)
end
it
'returns environment status'
do
...
...
@@ -126,7 +130,12 @@ describe EnvironmentStatus do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
sha:
sha
,
project:
project
)
}
let
(
:merge_request
)
do
create
(
:merge_request
,
source_project:
project
,
source_branch:
'feature'
,
target_project:
project
,
target_branch:
'master'
,
head_pipeline:
pipeline
)
create
(
:merge_request
,
source_project:
project
,
source_branch:
'feature'
,
target_project:
project
,
target_branch:
'master'
,
head_pipeline:
pipeline
)
end
it
'returns environment status'
do
...
...
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