mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 03:27:52 +00:00
22 lines
577 B
Ruby
22 lines
577 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe InboxMember do
|
|
include ActiveJob::TestHelper
|
|
|
|
describe '#DestroyAssociationAsyncJob' do
|
|
let(:inbox_member) { create(:inbox_member) }
|
|
|
|
# ref: https://github.com/chatwoot/chatwoot/issues/4616
|
|
context 'when parent inbox is destroyed' do
|
|
it 'enques and processes DestroyAssociationAsyncJob' do
|
|
perform_enqueued_jobs do
|
|
inbox_member.inbox.destroy!
|
|
end
|
|
expect { inbox_member.reload }.to raise_error(ActiveRecord::RecordNotFound)
|
|
end
|
|
end
|
|
end
|
|
end
|