* Rename the stripe_id column to transaction_id. * Add a new payment_processor column to identity the processor used for this transaction (and hence, which backend system the transaction_id is for).
39 lines
894 B
Ruby
39 lines
894 B
Ruby
FactoryBot.define do
|
|
factory(:user_upgrade) do
|
|
recipient { create(:member_user) }
|
|
purchaser { recipient }
|
|
upgrade_type { "gold" }
|
|
status { "pending" }
|
|
transaction_id { nil }
|
|
|
|
factory(:self_gold_upgrade) do
|
|
upgrade_type { "gold" }
|
|
end
|
|
|
|
factory(:self_platinum_upgrade) do
|
|
upgrade_type { "platinum" }
|
|
end
|
|
|
|
factory(:self_gold_to_platinum_upgrade) do
|
|
recipient { create(:gold_user) }
|
|
upgrade_type { "gold_to_platinum" }
|
|
end
|
|
|
|
factory(:gift_gold_upgrade) do
|
|
purchaser { create(:user) }
|
|
upgrade_type { "gold" }
|
|
end
|
|
|
|
factory(:gift_platinum_upgrade) do
|
|
purchaser { create(:user) }
|
|
upgrade_type { "platinum" }
|
|
end
|
|
|
|
factory(:gift_gold_to_platinum_upgrade) do
|
|
recipient { create(:gold_user) }
|
|
purchaser { create(:user) }
|
|
upgrade_type { "gold_to_platinum" }
|
|
end
|
|
end
|
|
end
|