diff options
author | James Lopez <james@jameslopez.es> | 2016-10-17 14:57:23 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 08:22:54 +0100 |
commit | 847d2796cfeda0347aae0649fed16250f6188ca9 (patch) | |
tree | 33bb6391ee44f4e80380209685ba1b81ecce35a1 /spec/lib/gitlab/cycle_analytics/events_spec.rb | |
parent | 470e39d64f02def538bb6aa3e51bcf406fd2e480 (diff) | |
download | gitlab-ce-847d2796cfeda0347aae0649fed16250f6188ca9.tar.gz |
fixed spec and SQL query
Diffstat (limited to 'spec/lib/gitlab/cycle_analytics/events_spec.rb')
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/events_spec.rb | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/events_spec.rb b/spec/lib/gitlab/cycle_analytics/events_spec.rb index 64387ef10d3..b32c4d6baa0 100644 --- a/spec/lib/gitlab/cycle_analytics/events_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/events_spec.rb @@ -14,8 +14,24 @@ describe Gitlab::CycleAnalytics::Events do describe '#issue' do let!(:context) { create(:issue, project: project) } - xit 'does something' do - expect(subject.issue_events).to eq([context]) + it 'has an issue diff' do + expect(subject.issue_events['issue_diff']).to eq("-00:00:00.339259") + end + + it 'has a title' do + expect(subject.issue_events['title']).to eq(context.title) + end + + it 'has an iid' do + expect(subject.issue_events['iid']).to eq(context.iid) + end + + it 'has a created_at timestamp' do + expect(subject.issue_events['created_at']).to eq(context.created_at) + end + + it "has the author's name" do + expect(subject.issue_events['name']).to eq(context.author.name) end end |