diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-08-23 23:05:39 +0300 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-09-05 15:24:33 +0300 |
commit | 7a8d216480b8b33c38c56c28734deb96f74f0988 (patch) | |
tree | 202207921cfedf2f228c26795e3846878f1aa04f /spec/lib/gitlab/time_tracking_formatter_spec.rb | |
parent | dd80d6229215d0ca4c3eae7bde1ac4b2a0d12d3c (diff) |
Fix time tracking parsing of months
Patches ChronicDuration to use our custom conversions
when parsing months
Diffstat (limited to 'spec/lib/gitlab/time_tracking_formatter_spec.rb')
-rw-r--r-- | spec/lib/gitlab/time_tracking_formatter_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/time_tracking_formatter_spec.rb b/spec/lib/gitlab/time_tracking_formatter_spec.rb index a85d418777f..cfc804c13a7 100644 --- a/spec/lib/gitlab/time_tracking_formatter_spec.rb +++ b/spec/lib/gitlab/time_tracking_formatter_spec.rb @@ -17,6 +17,14 @@ describe Gitlab::TimeTrackingFormatter do it { expect(subject).to eq(-12_000) } end + + context 'durations with months' do + let(:duration_string) { '1mo' } + + it 'uses our custom conversions' do + expect(subject).to eq(576_000) + end + end end describe '#output' do |