summaryrefslogtreecommitdiff
path: root/t/41-auditDIDs.t
blob: 6793931b12334f3ea6a562a0fa26ee8d6c17c89c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/perl -w

use Test::More skip_all => "not working with current test account?";

require 't/lib/test_account.pl';
require Net::VoIP_Innovations;

my($login, $password) = test_account_or_skip();
plan tests => 3;

my $debug = $ENV{TEST_VERBOSE};

my $gp = Net::VoIP_Innovations->new( 'login'    => $login,
                                     'password' => $password,
                                     #'debug'    => $debug,
                                   );
my $return = $gp->auditDIDs();

use Data::Dumper;
diag( Dumper($return) ); # if $debug;

ok( $return, 'auditDIDs returned something' );

#         'did' => [
#                   {
#                     'statuscode' => '100',
#                     'status' => 'Number currently assigned to you with refid  rewritten as \'\' to endpoint 521',
#                     'cnam' => 'False',
#                     'expire_seconds' => {},
#                     'availability' => 'assigned',
#                     'tn' => '2137851430',
#                     'rewrite' => {},
#                     'endpoint' => '521',
#                     'refid' => {}
#                   },
#                   {
#                     'statuscode' => '100',
#                     'status' => 'Number currently assigned to you with refid  rewritten as \'\' to endpoint 521',
#                     'cnam' => 'False',
#                     'expire_seconds' => {},
#                     'availability' => 'assigned',
#                     'tn' => '5109626974',
#                     'rewrite' => {},
#                     'endpoint' => '521',
#                     'refid' => {}
#                   }
#                 ]


ok( $return->{'did'}, 'auditDIDs returned did data' );

ok( ref($return->{'did'}) eq 'ARRAY', 'auditDIDs did data is a list' );