Chatwoot/spec/models/account_user_spec.rb
Sojan Jose 8b4df986bf
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>
2020-03-07 12:18:16 +05:30

16 lines
503 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
RSpec.describe User do
let!(:account_user) { create(:account_user) }
describe 'notification_settings' do
it 'gets created with the right default settings' do
expect(account_user.user.notification_settings).not_to eq(nil)
expect(account_user.user.notification_settings.first.conversation_creation?).to eq(false)
expect(account_user.user.notification_settings.first.conversation_assignment?).to eq(true)
end
end
end