test/test_users.rb in foursquare2-1.9.2 vs test/test_users.rb in foursquare2-1.9.3
- old
+ new
@@ -94,14 +94,21 @@
checkins_before.items.size.should == 5
checkins_before.items.reject { |ci| ci.createdAt < 1355867689 }.empty?.should == true
checkins_before.items.first.createdAt.should < checkins_before.items.last.createdAt
end
- should "find a users venuestats" do
+ should "find a users venuestats by self" do
stub_get("https://api.foursquare.com/v2/users/self/venuestats?oauth_token=#{@client.oauth_token}", "users/user_venuestats.json")
venuestats = @client.venuestats
venuestats.venues.size.should == 5
venuestats.categories.size.should == 10
+ end
+
+ should "find a users venuestats by inputting friends user_id" do
+ stub_get("https://api.foursquare.com/v2/users/555555/venuestats?oauth_token=#{@client.oauth_token}", "users/user_venuestats_friend_id.json")
+ friends_venuestats = @client.venuestats(555555)
+ friends_venuestats.venues.size.should == 5
+ friends_venuestats.categories.size.should == 8
end
end
end