Skip to content

Commit

Permalink
Update User.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrichardlai committed Mar 18, 2012
1 parent f9cd247 commit e0f4b37
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/taskrabbit/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ class User < Smash
property :first_name
property :full_name
property :display_name
property :runner, :default => false
property :email
property :mobile_phone
property :home_phone
property :tasks, :transformer => Api::collection_transformers[Task]
property :city, :transformer => City
property :zip_code
Expand Down
4 changes: 4 additions & 0 deletions spec/taskrabbit/account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
its(:first_name) { should == "Bob" }
its(:full_name) { should == "Bob Sponge" }
its(:display_name) { should == "Bob S." }
its(:runner) { should == false }
its(:email) { should == 'bobsponge@example.com' }
its(:mobile_phone) { should == nil }
its(:home_phone) { should == nil }
its(:tasks) { should be_a(Taskrabbit::Collection) } # TaskRabbit returns tasks in the json
its(:city) { should be_instance_of(Taskrabbit::City) }
its(:zip_code) { should == "64321" }
Expand Down
4 changes: 4 additions & 0 deletions spec/taskrabbit/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
its(:first_name) { should == "Bob" }
its(:full_name) { should == "Bob Sponge" }
its(:display_name) { should == "Bob S." }
its(:runner) { should == false }
its(:email) { should == 'bobsponge@example.com' }
its(:mobile_phone) { should == nil }
its(:home_phone) { should == nil }
its(:tasks) { should == Taskrabbit::Task }
its(:city) { should be_instance_of(Taskrabbit::City) }
its(:zip_code) { should == "64321" }
Expand Down

0 comments on commit e0f4b37

Please sign in to comment.