Refactoring: Migrate sixth test case in cti_caller_id_test.rb
This commit is contained in:
parent
a95c4e988d
commit
84d0bf605b
2 changed files with 1 additions and 13 deletions
|
@ -631,6 +631,7 @@ RSpec.describe User, type: :model do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'Cti::CallerId syncing:' do
|
||||
context 'with a #phone attribute' do
|
||||
subject(:user) { build(:user, phone: '1234567890') }
|
||||
|
|
|
@ -56,19 +56,6 @@ class CtiCallerIdTest < ActiveSupport::TestCase
|
|||
Scheduler.worker(true)
|
||||
end
|
||||
|
||||
test 'user delete with caller log rebuild' do
|
||||
assert_equal(2, Cti::CallerId.where(user_id: @agent2.id).count)
|
||||
|
||||
@agent2.destroy!
|
||||
|
||||
assert_equal(0, Cti::CallerId.where(user_id: @agent2.id).count)
|
||||
|
||||
Observer::Transaction.commit
|
||||
Scheduler.worker(true)
|
||||
|
||||
assert_equal(0, Cti::CallerId.where(user_id: @agent2.id).count)
|
||||
end
|
||||
|
||||
test 'order of events' do
|
||||
Cti::Log.process(
|
||||
'cause' => '',
|
||||
|
|
Loading…
Reference in a new issue