Welcome to mirror list, hosted at ThFree Co, Russian Federation.

compares.rb « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4dd94b930490e0ba1e39938b1d2156fbd6debfd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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