Skip to content

Commit

Permalink
Execution time
Browse files Browse the repository at this point in the history
Increasing code coverage

Signed-off-by: Rodrigo Nardi <[email protected]>
  • Loading branch information
RodrigoMNardi committed Sep 25, 2024
1 parent 898b758 commit f343aca
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/lib/models/ci_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,23 @@
end
end
end

describe '#execution_time' do
let(:stage) { create(:ci_job, check_ref: nil) }

context 'when CiJob started and finished' do
it 'must update status' do
stage.in_progress(github)
stage.success(github)
stage.update_execution_time
end
end

context 'when CiJob started and not finished' do
it 'must update status' do
stage.in_progress(github)
stage.update_execution_time
end
end
end
end

0 comments on commit f343aca

Please sign in to comment.