From 492fcf8ced5bac43c4bd6a3c3360c1cafa64bc25 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 21 Jan 2025 14:12:10 +0530 Subject: [PATCH] feat: add specs for missing configuration --- spec/enterprise/models/account_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) 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