initial commit
[Net-VoIP_Innovations.git] / t / 41-auditDIDs.t
1 #!/usr/bin/perl -w
2
3 use Test::More skip_all => "not working with current test account?";
4
5 require 't/lib/test_account.pl';
6 require Net::VoIP_Innovations;
7
8 my($login, $password) = test_account_or_skip();
9 plan tests => 3;
10
11 my $debug = $ENV{TEST_VERBOSE};
12
13 my $gp = Net::VoIP_Innovations->new( 'login'    => $login,
14                                      'password' => $password,
15                                      #'debug'    => $debug,
16                                    );
17 my $return = $gp->auditDIDs();
18
19 use Data::Dumper;
20 diag( Dumper($return) ); # if $debug;
21
22 ok( $return, 'auditDIDs returned something' );
23
24 #         'did' => [
25 #                   {
26 #                     'statuscode' => '100',
27 #                     'status' => 'Number currently assigned to you with refid  rewritten as \'\' to endpoint 521',
28 #                     'cnam' => 'False',
29 #                     'expire_seconds' => {},
30 #                     'availability' => 'assigned',
31 #                     'tn' => '2137851430',
32 #                     'rewrite' => {},
33 #                     'endpoint' => '521',
34 #                     'refid' => {}
35 #                   },
36 #                   {
37 #                     'statuscode' => '100',
38 #                     'status' => 'Number currently assigned to you with refid  rewritten as \'\' to endpoint 521',
39 #                     'cnam' => 'False',
40 #                     'expire_seconds' => {},
41 #                     'availability' => 'assigned',
42 #                     'tn' => '5109626974',
43 #                     'rewrite' => {},
44 #                     'endpoint' => '521',
45 #                     'refid' => {}
46 #                   }
47 #                 ]
48
49
50 ok( $return->{'did'}, 'auditDIDs returned did data' );
51
52 ok( ref($return->{'did'}) eq 'ARRAY', 'auditDIDs did data is a list' );
53