diff options
author | James Lopez <james@jameslopez.es> | 2016-10-19 12:47:09 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 08:22:54 +0100 |
commit | 3b5d947730eb1f979bcb9033d63bdceb11fbb8ca (patch) | |
tree | 5dc77ef9249c188f5b4521fd08d1c705f273734c /spec/lib/gitlab/cycle_analytics/events_spec.rb | |
parent | 1d6068a1c3c906e0e82f0dce884e59aa0da76506 (diff) | |
download | gitlab-ce-3b5d947730eb1f979bcb9033d63bdceb11fbb8ca.tar.gz |
commit events and spec
Diffstat (limited to 'spec/lib/gitlab/cycle_analytics/events_spec.rb')
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/events_spec.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/events_spec.rb b/spec/lib/gitlab/cycle_analytics/events_spec.rb index be62077f01b..ef59e8abc58 100644 --- a/spec/lib/gitlab/cycle_analytics/events_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/events_spec.rb @@ -11,11 +11,11 @@ describe Gitlab::CycleAnalytics::Events do setup(context) end - describe '#issue' do + describe '#issue_events' do let!(:context) { create(:issue, project: project, created_at: 2.days.ago) } - it 'has an issue diff' do - expect(subject.issue_events.first['issue_diff']).to eq('2 days ago') + it 'has the total time' do + expect(subject.issue_events.first['total_time']).to eq('2 days') end it 'has a title' do @@ -35,6 +35,18 @@ describe Gitlab::CycleAnalytics::Events do end end + describe '#plan_events' do + let!(:context) { create(:issue, project: project, created_at: 2.days.ago) } + + xit 'has the first referenced commit' do + expect(subject.plan_events.first['commit']).to eq(project.commit) + end + + it 'has the total time' do + expect(subject.plan_events.first['total_time']).to eq('2 days') + end + end + def setup(context) milestone = create(:milestone, project: project) context.update(milestone: milestone) |