Pass the models, not the ids, when dealing with friendships
This commit is contained in:
parent
2169c503ef
commit
d33b1f6b29
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue