diff options
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 |