diff --git a/spec/enterprise/models/account_spec.rb b/spec/enterprise/models/account_spec.rb index 19a57fd1f..def07985e 100644 --- a/spec/enterprise/models/account_spec.rb +++ b/spec/enterprise/models/account_spec.rb @@ -120,6 +120,15 @@ RSpec.describe Account, type: :model do end end + describe 'captain limits are not configured' do + it 'returns default values' do + account.custom_attributes = { 'plan_name': 'unknown' } + expect(account.captain_monthly_limit).to eq( + { documents: ChatwootApp.max_limit, generated_responses: ChatwootApp.max_limit }.with_indifferent_access + ) + end + end + describe 'audit logs' do it 'returns audit logs' do # checking whether associated_audits method is present