Merge branch 'ee'

This commit is contained in:
Priit Tark 2015-05-22 11:51:56 +03:00
commit 37319b20c5

View file

@ -13,13 +13,24 @@ registrar1 = Registrar.where(
code: 'REG1' code: 'REG1'
).first_or_create! ).first_or_create!
ApiUser.where( @api_user1 = ApiUser.where(
username: 'registrar1', username: 'registrar1',
password: 'test1', password: 'test1',
identity_code: '51001091072', identity_code: '51001091072',
active: true, active: true,
registrar: registrar1 registrar: registrar1
).first_or_create! ).first
if @api_user1.blank?
ApiUser.create(
username: 'registrar1',
password: 'test1',
identity_code: '51001091072',
active: true,
registrar: registrar1,
roles: ['super']
)
end
registrar2 = Registrar.where( registrar2 = Registrar.where(
name: 'Registrar Second AS', name: 'Registrar Second AS',
@ -33,13 +44,24 @@ registrar2 = Registrar.where(
code: 'REG2' code: 'REG2'
).first_or_create! ).first_or_create!
ApiUser.where( @api_user2 = ApiUser.where(
username: 'registrar2', username: 'registrar2',
password: 'test2', password: 'test2',
identity_code: '11412090004', identity_code: '11412090004',
active: true, active: true,
registrar: registrar2 registrar: registrar2
).first_or_create! ).first
if @api_user2.blank?
ApiUser.create(
username: 'registrar2',
password: 'test2',
identity_code: '11412090004',
active: true,
registrar: registrar2,
roles: ['super']
)
end
admin1 = { admin1 = {
username: 'user1', username: 'user1',