diff options
Diffstat (limited to 'spec/factories/go_modules.rb')
-rw-r--r-- | spec/factories/go_modules.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/factories/go_modules.rb b/spec/factories/go_modules.rb new file mode 100644 index 00000000000..fdbacf48d3b --- /dev/null +++ b/spec/factories/go_modules.rb @@ -0,0 +1,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 { create :project, :repository } + + path { '' } + name { "#{Settings.build_gitlab_go_url}/#{project.full_path}#{path.empty? ? '' : '/'}#{path}" } + end +end |