mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Merge branch 'ee'
This commit is contained in:
commit
37319b20c5
1 changed files with 26 additions and 4 deletions
30
db/seeds.rb
30
db/seeds.rb
|
@ -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',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue