fix: capture user and ip details on Inbox delete (#7395)
Fixes: https://linear.app/chatwoot/issue/CW-1772/ip-address-and-user-details-are-missing-in-some-of-the-logs Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -287,6 +287,8 @@ RSpec.describe 'Inboxes API', type: :request do
|
||||
let(:admin) { create(:user, account: account, role: :administrator) }
|
||||
|
||||
it 'deletes inbox' do
|
||||
expect(DeleteObjectJob).to receive(:perform_later).with(inbox, admin, anything).once
|
||||
|
||||
perform_enqueued_jobs(only: DeleteObjectJob) do
|
||||
delete "/api/v1/accounts/#{account.id}/inboxes/#{inbox.id}",
|
||||
headers: admin.create_new_auth_token,
|
||||
|
||||
Reference in New Issue
Block a user