mirror of
https://github.com/internetee/registry.git
synced 2025-05-30 17:33:57 +02:00
Allow api_user_with_unlimited_balance factory to accept registrar
This commit is contained in:
parent
9a6f5939c4
commit
2983a0e331
1 changed files with 7 additions and 2 deletions
|
@ -10,8 +10,13 @@ FactoryGirl.define do
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :api_user_with_unlimited_balance do
|
factory :api_user_with_unlimited_balance do
|
||||||
after :build do |api_user|
|
transient do
|
||||||
api_user.registrar = create(:registrar_with_unlimited_balance)
|
registrar false
|
||||||
|
end
|
||||||
|
|
||||||
|
after :build do |api_user, evaluator|
|
||||||
|
registrar = (evaluator.registrar || create(:registrar_with_unlimited_balance))
|
||||||
|
api_user.registrar = registrar
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue