diff options
author | James Lopez <james@jameslopez.es> | 2016-10-27 17:52:42 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 08:22:56 +0100 |
commit | ca9ae8bf63ff94c68143823046ab2a7466f30b1c (patch) | |
tree | e93849d907a53cbe1bc568c507e4a89736584986 /spec/lib/gitlab/cycle_analytics/events_spec.rb | |
parent | 32679232635dbd0d196a91d0788ee1135ff56b43 (diff) | |
download | gitlab-ce-ca9ae8bf63ff94c68143823046ab2a7466f30b1c.tar.gz |
add email to user related queries so it can be used for displaying avatar in the UI
Diffstat (limited to 'spec/lib/gitlab/cycle_analytics/events_spec.rb')
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/events_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/events_spec.rb b/spec/lib/gitlab/cycle_analytics/events_spec.rb index 410310d3029..7d544dbdb19 100644 --- a/spec/lib/gitlab/cycle_analytics/events_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/events_spec.rb @@ -30,6 +30,10 @@ describe Gitlab::CycleAnalytics::Events do expect(subject.issue_events.first['created_at']).to end_with('ago') end + it "has the author's email" do + expect(subject.issue_events.first['email']).to eq(context.author.email) + end + it "has the author's name" do expect(subject.issue_events.first['name']).to eq(context.author.name) end @@ -70,6 +74,10 @@ describe Gitlab::CycleAnalytics::Events do expect(subject.code_events.first['created_at']).to end_with('ago') end + it "has the author's email" do + expect(subject.code_events.first['email']).to eq(context.author.email) + end + it "has the author's name" do expect(subject.code_events.first['name']).to eq(context.author.name) end @@ -118,6 +126,10 @@ describe Gitlab::CycleAnalytics::Events do expect(subject.review_events.first['created_at']).to end_with('ago') end + it "has the author's email" do + expect(subject.review_events.first['email']).to eq(MergeRequest.first.author.email) + end + it "has the author's name" do expect(subject.review_events.first['name']).to eq(MergeRequest.first.author.name) end @@ -173,6 +185,10 @@ describe Gitlab::CycleAnalytics::Events do expect(subject.production_events.first['created_at']).to end_with('ago') end + it "has the author's email" do + expect(subject.production_events.first['email']).to eq(context.author.email) + end + it "has the author's name" do expect(subject.production_events.first['name']).to eq(context.author.name) end |