feat: add auditlogs for account model (#7511)

This commit is contained in:
Vishnu Narayanan
2023-07-19 23:52:34 +05:30
committed by GitHub
parent 1d718b92b7
commit ea825d49da
6 changed files with 21 additions and 6 deletions

View File

@@ -33,6 +33,11 @@ RSpec.describe Account do
# checking whether associated_audits method is present
expect(account.associated_audits.present?).to be false
end
it 'creates audit logs when account is updated' do
account.update(name: 'New Name')
expect(Audited::Audit.where(auditable_type: 'Account', action: 'update').count).to eq 1
end
end
it 'returns max limits from global config when enterprise version' do