summaryrefslogtreecommitdiff
path: root/spec/factories/go_modules.rb
blob: ca7184a9194686ffc50c176186e294be94f99303 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

FactoryBot.define do
  factory :go_module, class: 'Packages::Go::Module' do
    initialize_with { new(attributes[:project], attributes[:name], attributes[:path]) }
    skip_create

    project { association(:project, :repository) }

    path { '' }
    name { "#{Settings.build_gitlab_go_url}/#{project.full_path}#{path.empty? ? '' : '/'}#{path}" }
  end
end