Commit 2b321a39 authored by Mark Chao's avatar Mark Chao

Convenience metadata to stub gitlab.com

Ensure GitlabSubscription factory is only used under .com
parent 8abd656e
......@@ -2,6 +2,10 @@
FactoryBot.define do
factory :gitlab_subscription do
after(:build) do
raise 'not under .com' unless Gitlab.com?
end
namespace
association :hosted_plan, factory: :ultimate_plan
seats { 10 }
......
......@@ -73,7 +73,7 @@ FactoryBot.define do
factory :group_with_plan, parent: :group do
transient do
plan { :default_plan }
plan { :free_plan }
trial_ends_on { nil }
end
......
......@@ -47,7 +47,7 @@ end
FactoryBot.define do
factory :namespace_with_plan, parent: :namespace do
transient do
plan { :default_plan }
plan { :free_plan }
trial_ends_on { nil }
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