Initial commit
This commit is contained in:
14
spec/factories/activity.rb
Normal file
14
spec/factories/activity.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :activity do
|
||||
user { FactoryBot.create(:user) }
|
||||
user_ip { Faker::Internet.ip_v4_address }
|
||||
user_agent { Faker::Internet.user_agent }
|
||||
category { %w[admin user].sample }
|
||||
topic { %w[session password otp account].sample }
|
||||
action { %w[otp::enable login logout signup].sample }
|
||||
result { %w[succeed failed].sample }
|
||||
data { {data: Faker::Lorem.sentence(word_count: 3, supplemental: true, random_words_to_add: 4)}.to_json }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user