Advertisement
Guest User

Untitled

a guest
Mar 11th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.58 KB | None | 0 0
  1. def tmp_create_users(reset = false)
  2. if reset
  3. Subscription.destroy_all
  4. User.where.not(email: 'heroku@youneedabudget.com').destroy_all
  5. end
  6.  
  7. u = User.create! confirmed_at: Time.current, password: 'geo54715', email: 'monthly_10@benevolentcode.com'
  8. u.coupon = Coupon.lifetime_discount
  9. FactoryGirl.create :subscription, :monthly, user: u, id: SecureRandom.uuid, name_on_card: 'Monthly with Discount'
  10. u = User.create! confirmed_at: Time.current, password: 'geo54715', email: 'monthly_no_10@benevolentcode.com'
  11. FactoryGirl.create :subscription, :monthly, user: u, id: SecureRandom.uuid, name_on_card: 'Monthly no Discount'
  12. u = User.create! confirmed_at: Time.current, password: 'geo54715', email: 'pending_monthly_10@benevolentcode.com'
  13. u.coupon = Coupon.lifetime_discount
  14. FactoryGirl.create :subscription, :annual, :pending_monthly, user: u, id: SecureRandom.uuid, unit_amount_in_cents: 4500, name_on_card: '(Annual) Pending Monthly with Discount'
  15. u = User.create! confirmed_at: Time.current, password: 'geo54715', email: 'pending_monthly_no_10@benevolentcode.com'
  16. FactoryGirl.create :subscription, :annual, :pending_monthly, user: u, id: SecureRandom.uuid, name_on_card: '(Annual) Pending Monthly no Discount'
  17. u = User.create! confirmed_at: Time.current, password: 'geo54715', email: 'annual_10@benevolentcode.com'
  18. u.coupon = Coupon.lifetime_discount
  19. FactoryGirl.create :subscription, :annual, user: u, id: SecureRandom.uuid, unit_amount_in_cents: 4500, name_on_card: 'Annual with Discount'
  20. u = User.create! confirmed_at: Time.current, password: 'geo54715', email: 'annual_no_10@benevolentcode.com'
  21. FactoryGirl.create :subscription, :annual, user: u, id: SecureRandom.uuid, name_on_card: 'Annual no Discount'
  22. u = User.create! confirmed_at: Time.current, password: 'geo54715', email: 'pending_annual_10@benevolentcode.com'
  23. u.coupon = Coupon.lifetime_discount
  24. FactoryGirl.create :subscription, :monthly, pending_plan_code: 'annual', pending_unit_amount_in_cents: 4500, pending_currency: 'USD', user: u, id: SecureRandom.uuid, name_on_card: '(Monthly) Pending Annual with Discount'
  25. u = User.create! confirmed_at: Time.current, password: 'geo54715', email: 'pending_annual_no_10@benevolentcode.com'
  26. FactoryGirl.create :subscription, :monthly, :pending_annual, user: u, id: SecureRandom.uuid, name_on_card: '(Monthly) Pending Annual no Discount'
  27. u = User.create! confirmed_at: Time.current, password: 'geo54715', email: 'no_sub_10@benevolentcode.com'
  28. u.coupon = Coupon.lifetime_discount
  29. u = User.create! confirmed_at: Time.current, password: 'geo54715', email: 'no_sub_no_10@benevolentcode.com'
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement