diff options
author | James Lopez <james@jameslopez.es> | 2016-10-17 19:03:17 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 10:22:54 +0300 |
commit | c545968ece739e616047c519dbc66e4e428cdd8a (patch) | |
tree | d25e95ca8a385674196eb9264303deb06b4e1c45 /spec/lib | |
parent | 847d2796cfeda0347aae0649fed16250f6188ca9 (diff) |
fix timestamp diff and spec
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/events_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/events_spec.rb b/spec/lib/gitlab/cycle_analytics/events_spec.rb index b32c4d6baa0..543259f7cc2 100644 --- a/spec/lib/gitlab/cycle_analytics/events_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/events_spec.rb @@ -12,10 +12,10 @@ describe Gitlab::CycleAnalytics::Events do end describe '#issue' do - let!(:context) { create(:issue, project: project) } + let!(:context) { create(:issue, project: project, created_at: 2.days.ago) } it 'has an issue diff' do - expect(subject.issue_events['issue_diff']).to eq("-00:00:00.339259") + expect(subject.issue_events['issue_diff']).to eq('2 days ago') end it 'has a title' do @@ -23,11 +23,11 @@ describe Gitlab::CycleAnalytics::Events do end it 'has an iid' do - expect(subject.issue_events['iid']).to eq(context.iid) + expect(subject.issue_events['iid']).to eq(context.iid.to_s) end it 'has a created_at timestamp' do - expect(subject.issue_events['created_at']).to eq(context.created_at) + expect(subject.issue_events['created_at']).to eq('2 days ago') end it "has the author's name" do |