From 84d0bf605b1541b3fd8ed43b0465cf4763524589 Mon Sep 17 00:00:00 2001 From: Ryan Lue Date: Tue, 5 Feb 2019 13:45:04 +0800 Subject: [PATCH] Refactoring: Migrate sixth test case in cti_caller_id_test.rb --- spec/models/user_spec.rb | 1 + test/unit/cti_caller_id_test.rb | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 2aca5c1d0..dedd0ede8 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -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') } diff --git a/test/unit/cti_caller_id_test.rb b/test/unit/cti_caller_id_test.rb index 5037f2ee0..8de8e2e49 100644 --- a/test/unit/cti_caller_id_test.rb +++ b/test/unit/cti_caller_id_test.rb @@ -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' => '',