From: Marius Gavrilescu Date: Sat, 11 Oct 2014 22:36:15 +0000 (+0300) Subject: Add a network test for get_users X-Git-Tag: 0.000_003~1 X-Git-Url: http://git.ieval.ro/?p=www-backpacktf.git;a=commitdiff_plain;h=fc54cb3f5f8469711453842d83a1136272fd7744 Add a network test for get_users --- diff --git a/MANIFEST b/MANIFEST index c111228..2d3dd0e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -7,3 +7,4 @@ Makefile.PL MANIFEST README t/00-load.t +t/50-network.t diff --git a/Makefile.PL b/Makefile.PL index d8833bc..6d4a2b7 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -14,6 +14,9 @@ WriteMakefile( LWP::Simple 0 PerlX::Maybe 0/, }, + BUILD_REQUIRES => { + qw/LWP::Online 0/, + }, META_MERGE => { dynamic_config => 0, resources => { diff --git a/t/50-network.t b/t/50-network.t new file mode 100644 index 0000000..3f58417 --- /dev/null +++ b/t/50-network.t @@ -0,0 +1,12 @@ +#!/usr/bin/perl -w +use strict; +use warnings; + +use LWP::Online ':skip_all'; +use Test::More tests => 6; +use WWW::BackpackTF; + +my $bp = WWW::BackpackTF->new; +my $user = $bp->get_users('76561198057056782'); +is $user->{name}, 'gmariusx', '$user->{name} is correct'; +ok exists $user->{$_}, "\$user->{$_} exists" for qw/steamid backpack_value backpack_update backpack_tf_reputation notifications/;