Commit 849bb029 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Add additional factories for GitlabSubscription

parent 53fb4d47
...@@ -20,12 +20,22 @@ FactoryBot.define do ...@@ -20,12 +20,22 @@ FactoryBot.define do
trial_ends_on { Date.current.advance(days: 15) } trial_ends_on { Date.current.advance(days: 15) }
end end
trait :extended_trial do
active_trial
trial_extension_type { GitlabSubscription.trial_extension_types[:extended] }
end
trait :expired_trial do trait :expired_trial do
trial { true } trial { true }
trial_starts_on { Date.current.advance(days: -31) } trial_starts_on { Date.current.advance(days: -31) }
trial_ends_on { Date.current.advance(days: -1) } trial_ends_on { Date.current.advance(days: -1) }
end end
trait :reactivated_trial do
expired_trial
trial_extension_type { GitlabSubscription.trial_extension_types[:reactivated] }
end
trait :default do trait :default do
association :hosted_plan, factory: :default_plan association :hosted_plan, factory: :default_plan
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment