]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/diary_entries_controller_test.rb
Refactor friendships controller and model
[rails.git] / test / controllers / diary_entries_controller_test.rb
index a1c22fff8237e4dc356aca4f9e15dc792d4c4c95..c96c433bfc7e7824e45ed7338d720f54cb6ced38 100644 (file)
@@ -384,8 +384,8 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest
   def test_index_friends
     user = create(:user)
     other_user = create(:user)
-    friendship = create(:friendship, :befriender => user)
-    diary_entry = create(:diary_entry, :user => friendship.befriendee)
+    follow = create(:follow, :follower => user)
+    diary_entry = create(:diary_entry, :user => follow.following)
     _other_entry = create(:diary_entry, :user => other_user)
 
     # Try a list of diary entries for your friends when not logged in