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/users/group_visit.rb')
-rw-r--r--spec/factories/users/group_visit.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/users/group_visit.rb b/spec/factories/users/group_visit.rb
new file mode 100644
index 00000000000..a98ee61332a
--- /dev/null
+++ b/spec/factories/users/group_visit.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+FactoryBot.define do
+ factory :group_visit, class: 'Users::GroupVisit' do
+ transient { target_user { association(:user) } }
+ transient { target_group { association(:group) } }
+
+ user_id { target_user.id }
+ entity_id { target_group.id }
+ visited_at { Time.now }
+ end
+end