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