diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/lib/gitlab/seeder_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/lib/gitlab/seeder_spec.rb')
-rw-r--r-- | spec/lib/gitlab/seeder_spec.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/spec/lib/gitlab/seeder_spec.rb b/spec/lib/gitlab/seeder_spec.rb index 0ad80323085..a94ae2bca7a 100644 --- a/spec/lib/gitlab/seeder_spec.rb +++ b/spec/lib/gitlab/seeder_spec.rb @@ -77,44 +77,4 @@ RSpec.describe Gitlab::Seeder do end end end - - describe ::Gitlab::Seeder::Ci::DailyBuildGroupReportResult do - let_it_be(:group) { create(:group) } - let_it_be(:project) { create(:project, :repository, group: group) } - let_it_be(:pipeline) { create(:ci_pipeline, project: project) } - let_it_be(:build) { create(:ci_build, :success, pipeline: pipeline) } - - subject(:build_report) do - described_class.new(project) - end - - describe '#seed' do - it 'creates daily build results for the project' do - expect { build_report.seed }.to change { - Ci::DailyBuildGroupReportResult.count - }.by(Gitlab::Seeder::Ci::DailyBuildGroupReportResult::COUNT_OF_DAYS) - end - - it 'matches project data with last report' do - build_report.seed - - report = project.daily_build_group_report_results.last - reports_count = project.daily_build_group_report_results.count - - expect(build.group_name).to eq(report.group_name) - expect(pipeline.source_ref_path).to eq(report.ref_path) - expect(pipeline.default_branch?).to eq(report.default_branch) - expect(reports_count).to eq(Gitlab::Seeder::Ci::DailyBuildGroupReportResult::COUNT_OF_DAYS) - end - - it 'does not raise error on RecordNotUnique' do - build_report.seed - build_report.seed - - reports_count = project.daily_build_group_report_results.count - - expect(reports_count).to eq(Gitlab::Seeder::Ci::DailyBuildGroupReportResult::COUNT_OF_DAYS) - end - end - end end |