Sha256: fdb0b8c4a1d81e931c281a351237ea2800e7ab6c95506a1c9b9845867ba5c5fb

Contents?: true

Size: 1.45 KB

Versions: 26

Compression:

Stored size: 1.45 KB

Contents

FactoryGirl.define do
  sequence :name do |n|
    "Foo bar #{n}"
  end

  sequence :email do |n|
    "person#{n}@example.com"
  end

  sequence :uid do |n|
    "#{n}"
  end

  sequence :permalink do |n|
    "foo_page_#{n}"
  end

  factory :user do |f|
    f.name "Foo bar"
    f.email { generate(:email) }
    f.bio "This is Foo bar's biography."
  end

  factory :credi_card do |f|
    f.subscription_id { generate(:uid) }
    f.association :user, factory: :user
    f.last_digits '1235'
    f.card_brand 'visa'
  end

  factory :category do |f|
    f.name_pt { generate(:name) }
  end

  factory :bank do |f|
    f.name { generate(:uid) }
    f.code { generate(:uid) }
  end

  factory :bank_account do |f|
    f.association :bank
    f.account '1234'
    f.account_digit '1'
    f.agency '1'
    f.agency_digit '2'
    f.owner_name 'fooo'
    f.owner_document '9889'
  end

  factory :project do |f|
    f.name "Foo bar"
    f.permalink { generate(:permalink) }
    f.association :user, factory: :user
    f.association :category, factory: :category
    f.about "Foo bar"
    f.headline "Foo bar"
    f.goal 10000
    f.online_date Time.now
    f.online_days 5
    f.video_url 'http://vimeo.com/17298435'
    f.state 'online'
  end

  factory :contribution do |f|
    f.association :project, factory: :project
    f.association :user, factory: :user
    f.confirmed_at Time.now
    f.value 10.00
    f.state 'confirmed'
    f.credits false
    f.payment_id '1.2.3'
  end
end


Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
catarse_pagarme-2.5.1 spec/support/factories.rb
catarse_pagarme-2.5.0 spec/support/factories.rb
catarse_pagarme-2.4.10 spec/support/factories.rb
catarse_pagarme-2.4.9 spec/support/factories.rb
catarse_pagarme-2.4.8 spec/support/factories.rb
catarse_pagarme-2.4.7 spec/support/factories.rb
catarse_pagarme-2.4.6 spec/support/factories.rb
catarse_pagarme-2.4.5 spec/support/factories.rb
catarse_pagarme-2.4.4 spec/support/factories.rb
catarse_pagarme-2.4.3 spec/support/factories.rb
catarse_pagarme-2.4.2 spec/support/factories.rb
catarse_pagarme-1.5.3 spec/support/factories.rb
catarse_pagarme-1.5.2 spec/support/factories.rb
catarse_pagarme-2.4.1 spec/support/factories.rb
catarse_pagarme-1.5.1 spec/support/factories.rb
catarse_pagarme-1.5.0 spec/support/factories.rb
catarse_pagarme-2.4.0 spec/support/factories.rb
catarse_pagarme-2.3.10 spec/support/factories.rb
catarse_pagarme-1.4.9 spec/support/factories.rb
catarse_pagarme-2.3.9 spec/support/factories.rb