File: online.t

package info (click to toggle)
libwww-perl 6.78-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,008 kB
  • sloc: perl: 4,148; makefile: 10; sh: 6
file content (16 lines) | stat: -rw-r--r-- 381 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;
use Test::More;

use LWP::UserAgent ();

plan tests => 4;

my $ua = LWP::UserAgent->new;

is($ua->protocols_allowed(), undef, 'protocols_allowed: undefined');
ok($ua->is_online, 'is_online: truthy value');

$ua->protocols_allowed([]);
is_deeply($ua->protocols_allowed, [], 'protocols_allowed: empty list');
ok(!$ua->is_online, 'is_online: falsey value');