summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/01-login.t17
-rw-r--r--t/61-getDID.t7
-rw-r--r--t/62-getDIDs.t8
-rw-r--r--t/lib/test_account.pl12
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);
}