3 |
use strict; |
use strict; |
4 |
use blib; |
use blib; |
5 |
|
|
6 |
use Test::More tests => 5; |
use Test::More tests => 10; |
7 |
use Test::Exception; |
use Test::Exception; |
8 |
use Data::Dumper; |
use Data::Dumper; |
9 |
|
|
15 |
ok($node->set_url('http://localhost:1978/'), 'set_url'); |
ok($node->set_url('http://localhost:1978/'), 'set_url'); |
16 |
|
|
17 |
ok($node->set_proxy('proxy.example.com', 8080), 'set_proxy'); |
ok($node->set_proxy('proxy.example.com', 8080), 'set_proxy'); |
18 |
|
throws_ok {$node->set_proxy('proxy.example.com', 'foo') } qr/port/, 'set_proxy port NaN'; |
19 |
|
|
20 |
|
ok($node->set_timeout(42), 'set_timeout'); |
21 |
|
throws_ok {$node->set_timeout('foo') } qr/timeout/, 'set_timeout NaN'; |
22 |
|
|
23 |
|
ok($node->set_auth('foo','bar'), 'set_auth'); |
24 |
|
|
25 |
|
cmp_ok($node->status, '==', -1, 'status'); |