]> iEval git - www-backpacktf.git/commitdiff
Add a network test for get_users
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 11 Oct 2014 22:36:15 +0000 (01:36 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 11 Oct 2014 22:39:06 +0000 (01:39 +0300)
MANIFEST
Makefile.PL
t/50-network.t [new file with mode: 0644]

index c111228e7a6fb359ed153dae2d0b630ff7f5cdf5..2d3dd0e649976fd7af3ccfdaba9b488b743b4f15 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -7,3 +7,4 @@ Makefile.PL
 MANIFEST
 README
 t/00-load.t
+t/50-network.t
index d8833bca19029e46e8689aa20647a11e32d716f4..6d4a2b77a965f7917a53f598625ec61223d88a81 100644 (file)
@@ -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 (file)
index 0000000..3f58417
--- /dev/null
@@ -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/;
This page took 0.030415 seconds and 4 git commands to generate.