Skip to content

Commit

Permalink
[frontend] Fix fuzzy time, part II
Browse files Browse the repository at this point in the history
Re-apply changes made in 8f8c5ff
  • Loading branch information
bgeuken committed Apr 4, 2018
1 parent a415c17 commit f3506f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/spec/helpers/webui/webui_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@
end

context 'with_fulltime' do
time = 3.hours.ago
output = "<span title='#{time.utc.strftime('%Y-%m-%d %H:%M UTC')}' class='fuzzy-time'>about 3 hours ago</span>"
time = (3.hours - 2.minutes).ago.utc
output = "<span title='#{time.strftime('%Y-%m-%d %H:%M UTC')}' class='fuzzy-time'>about 3 hours ago</span>"
it { expect(fuzzy_time(time)).to eq(output) }
end

context 'without_fulltime' do
time = 3.hours.ago
time = (3.hours - 2.minutes).ago.utc
it { expect(fuzzy_time(time, false)).to eq('about 3 hours ago') }
end
end
Expand Down

0 comments on commit f3506f2

Please sign in to comment.