diff options
Diffstat (limited to 'spec/lib/gitlab/time_tracking_formatter_spec.rb')
-rw-r--r-- | spec/lib/gitlab/time_tracking_formatter_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/time_tracking_formatter_spec.rb b/spec/lib/gitlab/time_tracking_formatter_spec.rb index 8bbd1263057..ab0611e6b6a 100644 --- a/spec/lib/gitlab/time_tracking_formatter_spec.rb +++ b/spec/lib/gitlab/time_tracking_formatter_spec.rb @@ -47,5 +47,11 @@ RSpec.describe Gitlab::TimeTrackingFormatter do it { expect(subject).to eq('1w 1d 1h 40m') } end + + context 'handles negative time input' do + let(:num_seconds) { -178_800 } + + it { expect(subject).to eq('-1w 1d 1h 40m') } + end end end |