mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
commit
bd1d056b3d
15 changed files with 204 additions and 7 deletions
|
@ -1,12 +1,18 @@
|
|||
FactoryGirl.define do
|
||||
factory :api_user do
|
||||
sequence(:username) { |n| "test#{n}" }
|
||||
password 'a' * 6
|
||||
password 'a' * ApiUser.min_password_length
|
||||
roles ['super']
|
||||
registrar
|
||||
|
||||
factory :api_user_epp do
|
||||
roles %w(epp static_registrant)
|
||||
end
|
||||
|
||||
factory :api_user_with_unlimited_balance do
|
||||
after :build do |api_user|
|
||||
api_user.registrar = create(:registrar_with_unlimited_balance)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,5 +9,11 @@ FactoryGirl.define do
|
|||
zip 'test'
|
||||
email 'test@test.com'
|
||||
country_code 'EE'
|
||||
|
||||
factory :registrar_with_unlimited_balance do
|
||||
after :create do |registrar|
|
||||
create(:account, registrar: registrar, balance: 1_000_000)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue