summaryrefslogtreecommitdiff
path: root/spec/serializers
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-12-01 15:40:46 +0100
committerJames Lopez <james@jameslopez.es>2017-01-17 11:32:55 +0100
commitdaa4f3ded718f4144877b7f0402bd495151c28de (patch)
treec9fdc94111f9f27d4faddae666824fc2e0329cd8 /spec/serializers
parent58dddcdfed6212046447de8b6d304ffd463d0350 (diff)
downloadgitlab-ce-daa4f3ded718f4144877b7f0402bd495151c28de.tar.gz
fix spec failures after merge
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/analytics_stage_serializer_spec.rb4
-rw-r--r--spec/serializers/analytics_summary_serializer_spec.rb9
2 files changed, 9 insertions, 4 deletions
diff --git a/spec/serializers/analytics_stage_serializer_spec.rb b/spec/serializers/analytics_stage_serializer_spec.rb
index 47c537fcf84..3627a21230f 100644
--- a/spec/serializers/analytics_stage_serializer_spec.rb
+++ b/spec/serializers/analytics_stage_serializer_spec.rb
@@ -7,7 +7,7 @@ describe AnalyticsStageSerializer do
end
let(:json) { serializer.as_json }
- let(:resource) { Gitlab::CycleAnalytics::CodeStage.new(project: double, options: {}, stage: :code) }
+ let(:resource) { Gitlab::CycleAnalytics::CodeStage.new(project: double, options: {}) }
before do
allow_any_instance_of(Gitlab::CycleAnalytics::MetricsFetcher).to receive(:median).and_return(1.12)
@@ -15,7 +15,7 @@ describe AnalyticsStageSerializer do
end
it 'it generates payload for single object' do
- expect(json).to be_an_instance_of Hash
+ expect(json).to be_kind_of Hash
end
it 'contains important elements of AnalyticsStage' do
diff --git a/spec/serializers/analytics_summary_serializer_spec.rb b/spec/serializers/analytics_summary_serializer_spec.rb
index e08e3f88710..7a84c8b0b40 100644
--- a/spec/serializers/analytics_summary_serializer_spec.rb
+++ b/spec/serializers/analytics_summary_serializer_spec.rb
@@ -8,14 +8,19 @@ describe AnalyticsSummarySerializer do
let(:json) { serializer.as_json }
let(:project) { create(:empty_project) }
- let(:resource) { Gitlab::CycleAnalytics::Summary::Issue.new(project: double, from: 1.day.ago) }
+ let(:user) { create(:user) }
+ let(:resource) do
+ Gitlab::CycleAnalytics::Summary::Issue.new(project: double,
+ from: 1.day.ago,
+ current_user: user)
+ end
before do
allow_any_instance_of(Gitlab::CycleAnalytics::Summary::Issue).to receive(:value).and_return(1.12)
end
it 'it generates payload for single object' do
- expect(json).to be_an_instance_of Hash
+ expect(json).to be_kind_of Hash
end
it 'contains important elements of AnalyticsStage' do