summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-03-27 20:04:00 -0600
committerHombreLaser <sebastian-440@live.com>2023-03-27 20:04:00 -0600
commit35ec25dcb3d57b17a3dc174503b7d20dd4c46e43 (patch)
tree4bf53848d7460947b9c70aa74dc934279d94af55 /spec/factories
parent7b5d00f1bf262cc40b6b9dc21bb42e2dc7c80afe (diff)
Añade specs de Card
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/card.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/factories/card.rb b/spec/factories/card.rb
new file mode 100644
index 0000000..ddcafaf
--- /dev/null
+++ b/spec/factories/card.rb
@@ -0,0 +1,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