summaryrefslogtreecommitdiff
path: root/spec/factories/emails.rb
blob: b30fa8a58969c7b16669899b394af419253f4792 (plain)
1
2
3
4
5
6
7
8
9
10
11
# frozen_string_literal: true

FactoryBot.define do
  factory :email do
    user
    email { generate(:email_alias) }

    trait(:confirmed) { confirmed_at { Time.now } }
    trait(:skip_validate) { to_create {|instance| instance.save!(validate: false) } }
  end
end