Refactoring: Migrate sixth test case in cti_caller_id_test.rb

This commit is contained in:
Ryan Lue 2019-02-05 13:45:04 +08:00 committed by Martin Edenhofer
parent a95c4e988d
commit 84d0bf605b
2 changed files with 1 additions and 13 deletions

View file

@ -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') }

View file

@ -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' => '',