Chore: Enable Users to create multiple accounts (#440)
Addresses: #402 - migrations to split roles and other attributes from users table - make changes in code to accommodate this change Co-authored-by: Sojan Jose <sojan@pepalo.com> Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
account = Account.create!(name: 'Acme Inc')
|
||||
|
||||
user = User.new(name: 'John', email: 'john@acme.inc', password: '123456', account: account, role: :administrator)
|
||||
user = User.new(name: 'John', email: 'john@acme.inc', password: '123456')
|
||||
user.skip_confirmation!
|
||||
user.save!
|
||||
|
||||
AccountUser.create!(
|
||||
account_id: account.id,
|
||||
user_id: user.id,
|
||||
role: :administrator
|
||||
)
|
||||
|
||||
web_widget = Channel::WebWidget.create!(account: account, website_name: 'Acme', website_url: 'https://acme.inc')
|
||||
|
||||
inbox = Inbox.create!(channel: web_widget, account: account, name: 'Acme Support')
|
||||
|
||||
Reference in New Issue
Block a user