Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-10-27 19:52:42 +0300
committerJames Lopez <james@jameslopez.es>2016-11-17 10:22:56 +0300
commitca9ae8bf63ff94c68143823046ab2a7466f30b1c (patch)
treee93849d907a53cbe1bc568c507e4a89736584986 /spec/lib
parent32679232635dbd0d196a91d0788ee1135ff56b43 (diff)
add email to user related queries so it can be used for displaying avatar in the UI
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/cycle_analytics/events_spec.rb16
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