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-11-15 13:36:39 +0300
committerJames Lopez <james@jameslopez.es>2016-11-17 10:22:58 +0300
commit8743e59f78cd8f8701460796dcc06854281f3f73 (patch)
treed539fff96a88a8ea33f1a9ab62faffc678dd22d8 /spec/lib
parentf5600997512f1068cdc36ad7d086e7447dbc6d9d (diff)
get all stages to use serlalizers - apart from plan - WIP
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/cycle_analytics/events_spec.rb42
1 files changed, 25 insertions, 17 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/events_spec.rb b/spec/lib/gitlab/cycle_analytics/events_spec.rb
index 073469a2b80..55ab28e2af8 100644
--- a/spec/lib/gitlab/cycle_analytics/events_spec.rb
+++ b/spec/lib/gitlab/cycle_analytics/events_spec.rb
@@ -60,15 +60,15 @@ describe Gitlab::CycleAnalytics::Events do
end
it "has the author's URL" do
- expect(subject.plan_events.first[:author_profile_url]).not_to be_nil
+ expect(subject.plan_events.first[:author][:web_url]).not_to be_nil
end
it "has the author's avatar URL" do
- expect(subject.plan_events.first[:author_avatar_url]).not_to be_nil
+ expect(subject.plan_events.first[:author][:avatar_url]).not_to be_nil
end
it "has the author's name" do
- expect(subject.plan_events.first[:author_name]).not_to be_nil
+ expect(subject.plan_events.first[:author][:name]).to eq(context.author.name)
end
end
@@ -94,15 +94,15 @@ describe Gitlab::CycleAnalytics::Events do
end
it "has the author's URL" do
- expect(subject.code_events.first[:author_profile_url]).not_to be_nil
+ expect(subject.code_events.first[:author][:web_url]).not_to be_nil
end
it "has the author's avatar URL" do
- expect(subject.code_events.first[:author_avatar_url]).not_to be_nil
+ expect(subject.code_events.first[:author][:avatar_url]).not_to be_nil
end
it "has the author's name" do
- expect(subject.code_events.first[:author_name]).to eq(context.author.name)
+ expect(subject.code_events.first[:author][:name]).to eq(MergeRequest.first.author.name)
end
end
@@ -184,19 +184,19 @@ describe Gitlab::CycleAnalytics::Events do
end
it 'has a created_at timestamp' do
- expect(subject.review_events.first[:opened_at]).not_to be_nil
+ expect(subject.review_events.first[:created_at]).not_to be_nil
end
it "has the author's URL" do
- expect(subject.review_events.first[:author_profile_url]).not_to be_nil
+ expect(subject.review_events.first[:author][:web_url]).not_to be_nil
end
it "has the author's avatar URL" do
- expect(subject.review_events.first[:author_avatar_url]).not_to be_nil
+ expect(subject.review_events.first[:author][:avatar_url]).not_to be_nil
end
it "has the author's name" do
- expect(subject.review_events.first[:author_name]).to eq(MergeRequest.first.author.name)
+ expect(subject.review_events.first[:author][:name]).to eq(MergeRequest.first.author.name)
end
end
@@ -237,11 +237,11 @@ describe Gitlab::CycleAnalytics::Events do
end
it 'has the branch URL' do
- expect(subject.staging_events.first[:branch_url]).not_to be_nil
+ expect(subject.staging_events.first[:branch][:url]).not_to be_nil
end
it 'has the short SHA' do
- expect(subject.staging_events.first[:sha]).not_to be_nil
+ expect(subject.staging_events.first[:short_sha]).not_to be_nil
end
it 'has the commit URL' do
@@ -256,8 +256,16 @@ describe Gitlab::CycleAnalytics::Events do
expect(subject.staging_events.first[:total_time]).not_to be_nil
end
- it 'has the author name' do
- expect(subject.staging_events.first[:author_name]).not_to be_nil
+ it "has the author's URL" do
+ expect(subject.staging_events.first[:author][:web_url]).not_to be_nil
+ end
+
+ it "has the author's avatar URL" do
+ expect(subject.staging_events.first[:author][:avatar_url]).not_to be_nil
+ end
+
+ it "has the author's name" do
+ expect(subject.staging_events.first[:author][:name]).to eq(MergeRequest.first.author.name)
end
end
@@ -290,15 +298,15 @@ describe Gitlab::CycleAnalytics::Events do
end
it "has the author's URL" do
- expect(subject.production_events.first[:author_profile_url]).not_to be_nil
+ expect(subject.production_events.first[:author][:web_url]).not_to be_nil
end
it "has the author's avatar URL" do
- expect(subject.production_events.first[:author_avatar_url]).not_to be_nil
+ expect(subject.production_events.first[:author][:avatar_url]).not_to be_nil
end
it "has the author's name" do
- expect(subject.production_events.first[:author_name]).to eq(context.author.name)
+ expect(subject.production_events.first[:author][:name]).to eq(context.author.name)
end
end