]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/users_controller_test.rb
Pass the models, not the ids, when dealing with friendships
[rails.git] / test / controllers / users_controller_test.rb
index 9b7e0408de99f48f42968c0961daeddf67dc7c90..298eb9d6d4fc71b9527b78de62f8eb5ed06c9b3c 100644 (file)
@@ -1244,7 +1244,7 @@ class UsersControllerTest < ActionController::TestCase
     # Get users to work with
     user = create(:user)
     friend = create(:user)
-    create(:friendship, :user_id => user.id, :friend_user_id => friend.id)
+    create(:friendship, :befriender => user, :befriendee => friend)
 
     # Check that the users are friends
     assert Friendship.where(:user_id => user.id, :friend_user_id => friend.id).first