houdini/spec/factories/supporters.rb

21 lines
566 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2020-06-12 20:03:43 +00:00
# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE
FactoryBot.define do
factory :supporter do
name { 'Fake Supporter Name' }
2020-04-17 19:02:07 +00:00
nonprofit_id { 55352 }
trait :has_a_card do
after(:create) do |supporter|
create(:active_card_1, holder: supporter)
end
end
end
factory :supporter_with_fv_poverty, class: 'Supporter' do
name { 'Fake Supporter Name' }
nonprofit { association :fv_poverty}
end
end