mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
Merge branch 'improve-api-user-factory' into registry-270-no-schema
This commit is contained in:
commit
b4bb64639e
1 changed files with 7 additions and 2 deletions
|
@ -10,8 +10,13 @@ FactoryGirl.define do
|
|||
end
|
||||
|
||||
factory :api_user_with_unlimited_balance do
|
||||
after :build do |api_user|
|
||||
api_user.registrar = create(:registrar_with_unlimited_balance)
|
||||
transient do
|
||||
registrar false
|
||||
end
|
||||
|
||||
after :build do |api_user, evaluator|
|
||||
registrar = (evaluator.registrar || create(:registrar_with_unlimited_balance))
|
||||
api_user.registrar = registrar
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue