debian-mirror-gitlab/spec/factories/compares.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
491 B
Ruby
Raw Normal View History

2021-11-11 11:23:49 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :compare do
skip_create # No persistence
start_project { association(:project, :repository) }
target_project { start_project }
start_ref { 'master' }
target_ref { 'feature' }
base_sha { nil }
straight { false }
initialize_with do
CompareService
.new(start_project, start_ref)
.execute(target_project, target_ref, base_sha: base_sha, straight: straight)
end
end
end