diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-01-25 16:53:20 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-01-25 16:53:20 -0800 |
commit | 920293158ad908105cf20f047794a30ca39a64f3 (patch) | |
tree | 2b23e5f81a384c43b6872dc64b20cebccfe5b15a /t | |
parent | 1d339ad33855e8df8c1f466b494acbfd0e0907da (diff) |
initial version appears to be hooked up and working against dev sandbox
Diffstat (limited to 't')
-rw-r--r-- | t/01-login.t | 17 | ||||
-rw-r--r-- | t/61-getDID.t | 7 | ||||
-rw-r--r-- | t/62-getDIDs.t | 8 | ||||
-rw-r--r-- | t/lib/test_account.pl | 12 |
4 files changed, 15 insertions, 29 deletions
diff --git a/t/01-login.t b/t/01-login.t deleted file mode 100644 index 2642b59..0000000 --- a/t/01-login.t +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/perl -w - -use Test::More; -require 't/lib/test_account.pl'; - -my($login, $password) = test_account_or_skip; -plan tests => 2; - -use_ok 'Net::VoIP_Innovations'; - -my $gp = Net::VoIP_Innovations->new('login' => $login, - 'password' => $password ); - -#eww. what is the right, TEST_VERBOSE-aware way to do this -warn Net::VoIP_Innovations->errstr unless $gp; - -ok( $gp, 'Login sucessful' ); diff --git a/t/61-getDID.t b/t/61-getDID.t index 15dfe54..cd1b8d9 100644 --- a/t/61-getDID.t +++ b/t/61-getDID.t @@ -22,7 +22,8 @@ my $gp = Net::VoIP_Innovations->new( 'login' => $login, my $return = $gp->getDID(); use Data::Dumper; -diag( Dumper($return) ) if $debug; -#XXX test some things about the return... -ok( $return, 'getDID returned something' ); +#test some things about the return... +ok( $return->{type} ne 'Error', 'getDID returned no error' ); +diag( Dumper($return) ) if $return->{type} eq 'Error'; + diff --git a/t/62-getDIDs.t b/t/62-getDIDs.t index 52f0170..79c33e7 100644 --- a/t/62-getDIDs.t +++ b/t/62-getDIDs.t @@ -18,6 +18,7 @@ my $debug = $ENV{TEST_VERBOSE}; my $gp = Net::VoIP_Innovations->new( 'login' => $login, 'password' => $password, + #'debug' => 2, #'debug' => $debug, ); my $return = $gp->getDIDs( @@ -28,7 +29,8 @@ my $return = $gp->getDIDs( ); use Data::Dumper; -diag( Dumper($return) ); # if $debug; -#XXX test some things about the return... -ok( $return, 'getDIDs returned something' ); +#test some things about the return... +ok( $return->{type} ne 'Error', 'getDIDs returned no error' ); +diag( Dumper($return) ) if $return->{type} eq 'Error'; + diff --git a/t/lib/test_account.pl b/t/lib/test_account.pl index c52067d..b4ce640 100644 --- a/t/lib/test_account.pl +++ b/t/lib/test_account.pl @@ -15,13 +15,13 @@ sub test_account { my($login, $password, $hostport) = <TEST_ACCOUNT>; chomp $login; chomp $password; - chomp $hostport; + #chomp $hostport; - if ( $hostport =~ /^\s*([\w\.]+)(:(\d+))?\s*$/ ) { - my($host, $port) = ($1, $3); - $Net::VoIP_Innovations::HOST = $host; - $Net::VoIP_Innovations::PORT = $port; - } + #if ( $hostport =~ /^\s*([\w\.]+)(:(\d+))?\s*$/ ) { + # my($host, $port) = ($1, $3); + # $Net::VoIP_Innovations::HOST = $host; + # $Net::VoIP_Innovations::PORT = $port; + #} return($login, $password); } |