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/search_index.rb')
-rw-r--r--spec/factories/search_index.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/factories/search_index.rb b/spec/factories/search_index.rb
new file mode 100644
index 00000000000..15d7024dbf1
--- /dev/null
+++ b/spec/factories/search_index.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+FactoryBot.define do
+ factory :search_index, class: 'Search::Index' do
+ initialize_with { type.present? ? type.new : Search::Index.new }
+ sequence(:path) { |n| "index-path-#{n}" }
+ sequence(:bucket_number) { |n| n }
+ type { Search::NoteIndex }
+ end
+end