From 667a3b3753649a96ff368b20fffc940206892fea Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 12 Aug 2016 22:39:26 -0400 Subject: [PATCH] Fix test --- lib/WWW/BackpackTF/User.pm | 2 +- t/50-network.t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/WWW/BackpackTF/User.pm b/lib/WWW/BackpackTF/User.pm index 3120bcb..a27667c 100644 --- a/lib/WWW/BackpackTF/User.pm +++ b/lib/WWW/BackpackTF/User.pm @@ -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} } diff --git a/t/50-network.t b/t/50-network.t index 8f37da4..0bbb31c 100644 --- a/t/50-network.t +++ b/t/50-network.t @@ -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/; -- 2.39.2