Permalink
Browse files

Adding the 'installed' field to User

  • Loading branch information...
1 parent 9c11855 commit b2414864c7aca811c7ff7c4665e8c98c9c733936 @jonasfa jonasfa committed Apr 10, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −1 lib/mogli/user.rb
  2. +3 −2 spec/user_spec.rb
View
@@ -5,7 +5,7 @@ class User < Profile
define_properties :username, :first_name, :last_name, :link, :about, :birthday, :gender,
:email, :website, :timezone, :updated_time, :verified, :political, :bio,
:interested_in, :relationship_status, :locale, :religion, :quotes, :third_party_id,
- :inspirational_people, :sports, :with, :middle_name, :category
+ :inspirational_people, :sports, :with, :middle_name, :category, :installed
def self.recognize?(hash)
!hash.has_key?("category")
View
@@ -25,10 +25,11 @@
it "finds optional fields for a user" do
Mogli::Client.should_receive(:get).with("https://graph.facebook.com/1",
- :query=>{:fields => "birthday,gender"}).and_return({:id=>1, :birthday=>'09/15', :gender => 'male'})
- user = Mogli::User.find(1, nil, :birthday, :gender)
+ :query=>{:fields => "birthday,gender,installed"}).and_return({:id=>1, :birthday=>'09/15', :gender => 'male', :installed => true})
+ user = Mogli::User.find(1, nil, :birthday, :gender, :installed)
user.birthday.should == '09/15'
user.gender.should == 'male'
+ user.installed.should == true
end
it "finds a user's friends with optional fields" do

0 comments on commit b241486

Please sign in to comment.