]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/user_test.rb
Merge branch 'pull/5512'
[rails.git] / test / models / user_test.rb
index 3b600fc8787b26a92895af4ac5480c5bde0d3153..5c1c5a26f2a37f2520a10d1f368743c088804681 100644 (file)
@@ -136,18 +136,18 @@ class UserTest < ActiveSupport::TestCase
     assert_predicate user, :valid?, "user_0 display_name is invalid but it hasn't been changed"
   end
 
-  def test_friends_with
+  def test_follows
     alice = create(:user, :active)
     bob = create(:user, :active)
     charlie = create(:user, :active)
     create(:follow, :follower => alice, :following => bob)
 
-    assert alice.friends_with?(bob)
-    assert_not alice.friends_with?(charlie)
-    assert_not bob.friends_with?(alice)
-    assert_not bob.friends_with?(charlie)
-    assert_not charlie.friends_with?(bob)
-    assert_not charlie.friends_with?(alice)
+    assert alice.follows?(bob)
+    assert_not alice.follows?(charlie)
+    assert_not bob.follows?(alice)
+    assert_not bob.follows?(charlie)
+    assert_not charlie.follows?(bob)
+    assert_not charlie.follows?(alice)
   end
 
   def test_users_nearby