1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/factories/sessions.rb

20 lines
458 B
Ruby
Raw Normal View History

2019-09-03 09:43:24 -04:00
# frozen_string_literal: true
FactoryBot.define do
factory :some_session, class: Session do
association :account, factory: :usual_account
2019-09-03 10:01:00 -04:00
logged_at { Faker::Time.backward.utc }
2019-09-03 09:43:24 -04:00
ip_address { Faker::Internet.ip_v4_address }
trait :with_ipv6_address do
ip_address { Faker::Internet.ip_v6_address }
end
end
2019-09-04 16:54:23 -04:00
factory :some_session_with_ipv6_address,
2019-09-03 09:43:24 -04:00
parent: :some_session,
traits: %i[with_ipv6_address]
end