Skip to content

Commit f343aca

Browse files
committed
Execution time
Increasing code coverage Signed-off-by: Rodrigo Nardi <rnardi@netdef.org>
1 parent 898b758 commit f343aca

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

spec/lib/models/ci_job_spec.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,23 @@
8080
end
8181
end
8282
end
83+
84+
describe '#execution_time' do
85+
let(:stage) { create(:ci_job, check_ref: nil) }
86+
87+
context 'when CiJob started and finished' do
88+
it 'must update status' do
89+
stage.in_progress(github)
90+
stage.success(github)
91+
stage.update_execution_time
92+
end
93+
end
94+
95+
context 'when CiJob started and not finished' do
96+
it 'must update status' do
97+
stage.in_progress(github)
98+
stage.update_execution_time
99+
end
100+
end
101+
end
83102
end

0 commit comments

Comments
 (0)