2021-01-21 19:18:39 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# 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
|
2021-06-07 20:02:02 +00:00
|
|
|
FactoryBot.define do
|
|
|
|
factory :recurrence do
|
2021-06-07 17:34:08 +00:00
|
|
|
supporter { association :supporter_with_fv_poverty }
|
|
|
|
recurring_donation do
|
|
|
|
association(:rd_with_dedication_designation,
|
|
|
|
nonprofit: supporter.nonprofit,
|
|
|
|
supporter: supporter,
|
|
|
|
donation: association(:donation_with_dedication_designation, nonprofit: supporter.nonprofit,
|
|
|
|
supporter: supporter))
|
|
|
|
end
|
|
|
|
amount { 500 }
|
2021-06-08 19:34:54 +00:00
|
|
|
|
|
|
|
factory :recurrence_with_paydate_earlier_in_month do
|
|
|
|
recurring_donation do
|
|
|
|
association(:rd_with_dedication_designation,
|
|
|
|
nonprofit: supporter.nonprofit,
|
|
|
|
supporter: supporter,
|
|
|
|
donation: association(
|
|
|
|
:donation_with_dedication_designation,
|
|
|
|
nonprofit: supporter.nonprofit,
|
|
|
|
supporter: supporter
|
|
|
|
),
|
|
|
|
paydate: 3)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
factory :recurrence_with_paydate_later_in_month do
|
|
|
|
recurring_donation do
|
|
|
|
association(:rd_with_dedication_designation,
|
|
|
|
nonprofit: supporter.nonprofit,
|
|
|
|
supporter: supporter,
|
|
|
|
donation: association(
|
|
|
|
:donation_with_dedication_designation,
|
|
|
|
nonprofit: supporter.nonprofit,
|
|
|
|
supporter: supporter
|
|
|
|
),
|
|
|
|
paydate: 5)
|
|
|
|
end
|
|
|
|
end
|
2021-06-07 17:34:08 +00:00
|
|
|
end
|
2021-01-21 19:18:39 +00:00
|
|
|
end
|