Commit 45970b95 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch '26574-rename-lm-factory' into 'master'

Rename license report factory

See merge request gitlab-org/gitlab!18123
parents 207c7aa3 b8a95c69
# frozen_string_literal: true
FactoryBot.define do
factory :ci_reports_license_management_report, class: ::Gitlab::Ci::Reports::LicenseScanning::Report do
factory :ci_reports_license_scanning_report, class: ::Gitlab::Ci::Reports::LicenseScanning::Report do
trait :report_1 do
after(:build) do |report, evaluator|
report.add_dependency('MIT', 1, 'https://opensource.org/licenses/mit', 'Library1')
......
......@@ -20,7 +20,7 @@ describe Gitlab::Ci::Reports::DependencyList::Report do
describe '#apply_license' do
subject { report.dependencies.last[:licenses].size }
let(:license) { build(:ci_reports_license_management_report, :mit).licenses.first }
let(:license) { build(:ci_reports_license_scanning_report, :mit).licenses.first }
before do
license.add_dependency(name_of_dependency_with_license)
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::LicenseScanning::Report do
subject { build(:ci_reports_license_management_report, :mit) }
subject { build(:ci_reports_license_scanning_report, :mit) }
describe '#violates?' do
let(:project) { create(:project) }
......@@ -43,8 +43,8 @@ describe Gitlab::Ci::Reports::LicenseScanning::Report do
end
describe "#diff_with" do
let(:report_1) { build(:ci_reports_license_management_report, :report_1) }
let(:report_2) { build(:ci_reports_license_management_report, :report_2) }
let(:report_1) { build(:ci_reports_license_scanning_report, :report_1) }
let(:report_2) { build(:ci_reports_license_scanning_report, :report_2) }
subject { report_1.diff_with(report_2) }
before do
......@@ -62,8 +62,8 @@ describe Gitlab::Ci::Reports::LicenseScanning::Report do
end
describe "#empty?" do
let(:completed_report) { build(:ci_reports_license_management_report, :report_1) }
let(:empty_report) { build(:ci_reports_license_management_report) }
let(:completed_report) { build(:ci_reports_license_scanning_report, :report_1) }
let(:empty_report) { build(:ci_reports_license_scanning_report) }
it { expect(empty_report).to be_empty }
it { expect(completed_report).not_to be_empty }
......
......@@ -3,8 +3,8 @@
require 'spec_helper'
describe Gitlab::Ci::Reports::LicenseScanning::ReportsComparer do
let(:report_1) { build :ci_reports_license_management_report, :report_1 }
let(:report_2) { build :ci_reports_license_management_report, :report_2 }
let(:report_1) { build :ci_reports_license_scanning_report, :report_1 }
let(:report_2) { build :ci_reports_license_scanning_report, :report_2 }
let(:report_comparer) { described_class.new(report_1, report_2) }
before do
......
......@@ -6,7 +6,7 @@ describe LicenseEntity do
describe '#as_json' do
subject { described_class.represent(license).as_json }
let(:license) { build(:ci_reports_license_management_report, :mit).licenses.first }
let(:license) { build(:ci_reports_license_scanning_report, :mit).licenses.first }
let(:assert_license) do
{
......
......@@ -3,7 +3,7 @@
require 'spec_helper'
describe LicensesListEntity do
let(:report) { build(:ci_reports_license_management_report, :mit) }
let(:report) { build(:ci_reports_license_scanning_report, :mit) }
it_behaves_like 'report list' do
let(:name) { :licenses }
......
......@@ -13,7 +13,7 @@ describe LicensesListSerializer do
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
let(:ci_build) { create(:ee_ci_build, :success) }
let(:report) { build(:ci_reports_license_management_report, :mit) }
let(:report) { build(:ci_reports_license_scanning_report, :mit) }
before do
project.add_guest(user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment