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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/go_modules.rb')
-rw-r--r--spec/factories/go_modules.rb13
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