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
f19e259f
Commit
f19e259f
authored
Oct 26, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix duration specs
parent
d8aed6a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
14 deletions
+7
-14
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+7
-14
No files found.
spec/models/ci/pipeline_spec.rb
View file @
f19e259f
...
...
@@ -144,31 +144,24 @@ describe Ci::Pipeline, models: true do
describe
'#duration'
do
before
do
pipeline
.
update
(
created_at:
current
)
travel_to
(
current
+
5
)
do
pipeline
.
run
pipeline
.
save
end
travel_to
(
current
+
30
)
do
build
.
success
build
.
run!
build
.
success!
build_b
.
run!
build_c
.
run!
end
travel_to
(
current
+
40
)
do
build_b
.
drop
build_b
.
drop
!
end
travel_to
(
current
+
70
)
do
build_c
.
success
build_c
.
success
!
end
# We have to reload pipeline, because its status is updated by processing builds
pipeline
.
reload
.
drop
end
it
'matches sum of builds duration'
do
binding
.
pry
pipeline
.
reload
expect
(
pipeline
.
duration
).
to
eq
(
40
)
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