Merge pull request #335 from internetee/registry-248

Registry 248
This commit is contained in:
Timo Võhmar 2017-01-24 14:31:20 +02:00 committed by GitHub
commit bd1d056b3d
15 changed files with 204 additions and 7 deletions

View file

@ -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

View file

@ -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