Fix test
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 13 Aug 2016 02:39:26 +0000 (22:39 -0400)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 13 Aug 2016 02:39:26 +0000 (22:39 -0400)
lib/WWW/BackpackTF/User.pm
t/50-network.t

index 3120bcbc20c9ed083b802040880b820df55f6480..a27667ce879365087db509e23034990cfe87810f 100644 (file)
@@ -21,7 +21,7 @@ sub banned_backpack  { shift->{backpack_tf_banned} }
 sub banned_economy   { shift->{ban_economy} }
 sub banned_community { shift->{ban_community} }
 sub banned_vac       { shift->{ban_vac} }
-sub notifications    { shift->{notifications} }
+sub notifications    { shift->{notifications} // 0 }
 sub value            { shift->{backpack_value}->{shift // WWW::BackpackTF::TF2} }
 sub update           { shift->{backpack_update}->{shift // WWW::BackpackTF::TF2} }
 
index 8f37da40976da64155d2356f45f603c79caed26d..0bbb31cc4f476640e16beeacf7b44d9af3caa0a0 100644 (file)
@@ -3,10 +3,10 @@ use strict;
 use warnings;
 
 use Test::RequiresInternet 'backpack.tf' => 80;
-use Test::More tests => 6;
+use Test::More tests => 5;
 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/;
+ok exists $user->{$_}, "\$user->{$_} exists" for qw/steamid backpack_value backpack_update backpack_tf_reputation/;
This page took 0.010957 seconds and 4 git commands to generate.