Commit 6fc29038c477ac140fed00a6363f20a21217d496
1 parent
1628c334
Exists in
master
and in
28 other branches
Removing unused code
(ActionItem1635)
Showing
2 changed files
with
0 additions
and
15 deletions
Show diff stats
app/models/person.rb
| ... | ... | @@ -31,11 +31,6 @@ class Person < Profile |
| 31 | 31 | self.user.destroy if self.user |
| 32 | 32 | end |
| 33 | 33 | |
| 34 | - named_scope :connected, | |
| 35 | - :select => Profile.qualified_column_names, | |
| 36 | - :joins => :user, | |
| 37 | - :conditions => ['presence_status IS NOT NULL AND presence_status != ? AND presence_status != ?', 'offline', ''] | |
| 38 | - | |
| 39 | 34 | # Sets the identifier for this person. Raises an exception when called on a |
| 40 | 35 | # existing person (since peoples' identifiers cannot be changed) |
| 41 | 36 | def identifier=(value) | ... | ... |
test/unit/person_test.rb
| ... | ... | @@ -635,16 +635,6 @@ class PersonTest < Test::Unit::TestCase |
| 635 | 635 | assert_equal [p1,p2] , Person.more_popular |
| 636 | 636 | end |
| 637 | 637 | |
| 638 | - should 'who is connected and available for chat' do | |
| 639 | - online_user = create_user('Online') | |
| 640 | - online_user.update_attribute(:presence_status, 'chat') | |
| 641 | - | |
| 642 | - offline_user = create_user('Offline') | |
| 643 | - | |
| 644 | - assert_includes Person.connected, online_user.person(true) | |
| 645 | - assert_not_includes Person.connected, offline_user.person(true) | |
| 646 | - end | |
| 647 | - | |
| 648 | 638 | should 'persons has reference to user' do |
| 649 | 639 | person = Person.new |
| 650 | 640 | assert_nothing_raised do | ... | ... |