diff options
Diffstat (limited to 'spec/serializers/ci/codequality_mr_diff_entity_spec.rb')
-rw-r--r-- | spec/serializers/ci/codequality_mr_diff_entity_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/serializers/ci/codequality_mr_diff_entity_spec.rb b/spec/serializers/ci/codequality_mr_diff_entity_spec.rb index 82708908d95..4f161c36b06 100644 --- a/spec/serializers/ci/codequality_mr_diff_entity_spec.rb +++ b/spec/serializers/ci/codequality_mr_diff_entity_spec.rb @@ -4,18 +4,18 @@ require 'spec_helper' RSpec.describe Ci::CodequalityMrDiffEntity do let(:entity) { described_class.new(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 '#as_json' do subject(:report) { entity.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 'contains correct codequality mr diff report', :aggregate_failures do |