diff options
author | James Lopez <james@jameslopez.es> | 2016-10-18 11:06:42 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 10:22:54 +0300 |
commit | 1d6068a1c3c906e0e82f0dce884e59aa0da76506 (patch) | |
tree | 08ca7bfa40e923d31b48ca227ca145f0a4a414cc /spec/lib | |
parent | c545968ece739e616047c519dbc66e4e428cdd8a (diff) |
fix specs - issue events working
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/events_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/events_spec.rb b/spec/lib/gitlab/cycle_analytics/events_spec.rb index 543259f7cc2..be62077f01b 100644 --- a/spec/lib/gitlab/cycle_analytics/events_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/events_spec.rb @@ -15,23 +15,23 @@ describe Gitlab::CycleAnalytics::Events do 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('2 days ago') + expect(subject.issue_events.first['issue_diff']).to eq('2 days ago') end it 'has a title' do - expect(subject.issue_events['title']).to eq(context.title) + expect(subject.issue_events.first['title']).to eq(context.title) end it 'has an iid' do - expect(subject.issue_events['iid']).to eq(context.iid.to_s) + expect(subject.issue_events.first['iid']).to eq(context.iid.to_s) end it 'has a created_at timestamp' do - expect(subject.issue_events['created_at']).to eq('2 days ago') + expect(subject.issue_events.first['created_at']).to end_with('ago') end it "has the author's name" do - expect(subject.issue_events['name']).to eq(context.author.name) + expect(subject.issue_events.first['name']).to eq(context.author.name) end end |