diff options
Diffstat (limited to 'spec/serializers/ci/codequality_mr_diff_report_serializer_spec.rb')
-rw-r--r-- | spec/serializers/ci/codequality_mr_diff_report_serializer_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/serializers/ci/codequality_mr_diff_report_serializer_spec.rb b/spec/serializers/ci/codequality_mr_diff_report_serializer_spec.rb index 906ca36041f..6afbc3b8353 100644 --- a/spec/serializers/ci/codequality_mr_diff_report_serializer_spec.rb +++ b/spec/serializers/ci/codequality_mr_diff_report_serializer_spec.rb @@ -4,18 +4,18 @@ require 'spec_helper' RSpec.describe Ci::CodequalityMrDiffReportSerializer do let(:serializer) { described_class.new.represent(mr_diff_report) } - let(:mr_diff_report) { Gitlab::Ci::Reports::CodequalityMrDiff.new(codequality_report) } + let(:mr_diff_report) { Gitlab::Ci::Reports::CodequalityMrDiff.new(codequality_report.all_degradations) } let(:codequality_report) { Gitlab::Ci::Reports::CodequalityReports.new } - let(:degradation_1) { build(:codequality_degradation_1) } - let(:degradation_2) { build(:codequality_degradation_2) } + let(:major) { build(:codequality_degradation, :major) } + let(:minor) { build(:codequality_degradation, :minor) } describe '#to_json' do subject { serializer.as_json } context 'when quality report has degradations' do before do - codequality_report.add_degradation(degradation_1) - codequality_report.add_degradation(degradation_2) + codequality_report.add_degradation(major) + codequality_report.add_degradation(minor) end it 'matches the schema' do |