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

FactoryBot.define do
  factory :card, class: 'Card' do
    number { "#{rand(1000..9999)}-#{rand(1000..9999)}-#{rand(1000..9999)}-#{rand(1000..9999)}" }
    expiration_day { rand(1..31) }
    expiration_month { rand(1..12) }
    expiration_year { rand(1971..2025) }
    security_code { rand(100..999) }
    user_account { create(:user_account) }
  end
end