From 6b92d724ba32af43410d9563e77de6bb1013a5f1 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 20 Dec 2016 10:34:07 +0100 Subject: [PATCH] Tests: CTI-Test gefixt MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Nach Übernahme von Commit cfb460aac »CTI: wenn kein dial_command vorhanden callto: links rendern« aus der LINET-Installation war dies aufgrund erweiterter Funktionalität nötig. --- t/cti/call_link.t | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/t/cti/call_link.t b/t/cti/call_link.t index 994a34856..66e585177 100644 --- a/t/cti/call_link.t +++ b/t/cti/call_link.t @@ -1,4 +1,4 @@ -use Test::More tests => 9; +use Test::More tests => 17; use strict; use lib 't'; @@ -6,10 +6,8 @@ use utf8; use_ok 'SL::CTI'; -{ - no warnings 'once'; - $::lx_office_conf{cti}->{international_dialing_prefix} = '00'; -} +$::lx_office_conf{cti}->{international_dialing_prefix} = '00'; +$::lx_office_conf{cti}->{dial_command} = 'dummy'; is SL::CTI->call_link(number => '0371 5347 620'), 'controller.pl?action=CTI/call&number=03715347620'; is SL::CTI->call_link(number => '0049(0)421-22232 22'), 'controller.pl?action=CTI/call&number=00494212223222'; @@ -20,3 +18,15 @@ is SL::CTI->call_link(number => '0371 5347 620', internal => 1), 'control is SL::CTI->call_link(number => '0049(0)421-22232 22', internal => 1), 'controller.pl?action=CTI/call&number=00494212223222&internal=1'; is SL::CTI->call_link(number => '+49(0)421-22232 22', internal => 1), 'controller.pl?action=CTI/call&number=00494212223222&internal=1'; is SL::CTI->call_link(number => 'Tel: +49 40 809064 0', internal => 1), 'controller.pl?action=CTI/call&number=0049408090640&internal=1'; + +$::lx_office_conf{cti}->{dial_command} = ''; + +is SL::CTI->call_link(number => '0371 5347 620'), 'callto://03715347620'; +is SL::CTI->call_link(number => '0049(0)421-22232 22'), 'callto://00494212223222'; +is SL::CTI->call_link(number => '+49(0)421-22232 22'), 'callto://00494212223222'; +is SL::CTI->call_link(number => 'Tel: +49 40 809064 0'), 'callto://0049408090640'; + +is SL::CTI->call_link(number => '0371 5347 620', internal => 1), 'callto://03715347620'; +is SL::CTI->call_link(number => '0049(0)421-22232 22', internal => 1), 'callto://00494212223222'; +is SL::CTI->call_link(number => '+49(0)421-22232 22', internal => 1), 'callto://00494212223222'; +is SL::CTI->call_link(number => 'Tel: +49 40 809064 0', internal => 1), 'callto://0049408090640'; -- 2.20.1