chore: Fix emails being sent with the wrong translations (#2236)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sojan Jose
2021-06-08 22:45:01 +05:30
committed by GitHub
parent 67ce6f5704
commit 1bf7227843
15 changed files with 75 additions and 38 deletions

View File

@@ -16,6 +16,10 @@ unless Rails.env.production?
name: 'Acme Inc'
)
secondary_account = Account.create!(
name: 'Acme Org'
)
user = User.new(name: 'John', email: 'john@acme.inc', password: 'Password1!')
user.skip_confirmation!
user.save!
@@ -26,6 +30,18 @@ unless Rails.env.production?
role: :administrator
)
AccountUser.create!(
account_id: secondary_account.id,
user_id: user.id,
role: :administrator
)
# Enables creating additional accounts from dashboard
installation_config = InstallationConfig.find_by(name: 'CREATE_NEW_ACCOUNT_FROM_DASHBOARD')
installation_config.value = true
installation_config.save!
GlobalConfig.clear_cache
web_widget = Channel::WebWidget.create!(account: account, website_url: 'https://acme.inc')
inbox = Inbox.create!(channel: web_widget, account: account, name: 'Acme Support')