]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/diary_entry_controller_test.rb
Replace changeset_comments fixtures with a factory.
[rails.git] / test / controllers / diary_entry_controller_test.rb
index 6e07a409102a0c254bd36bb3c3c5210b62b94cf2..813b50b2f3be35fb35d2dccecabde2ca15c21fdb 100644 (file)
@@ -1,7 +1,7 @@
 require "test_helper"
 
 class DiaryEntryControllerTest < ActionController::TestCase
-  fixtures :users, :user_roles, :languages, :friends
+  fixtures :users, :user_roles, :languages
 
   include ActionView::Helpers::NumberHelper
 
@@ -419,7 +419,8 @@ class DiaryEntryControllerTest < ActionController::TestCase
   end
 
   def test_list_friends
-    diary_entry = create(:diary_entry, :user_id => friends(:normal_user_with_second_user).friend_user_id)
+    friend = create(:friend, :user_id => users(:normal_user).id)
+    diary_entry = create(:diary_entry, :user_id => friend.friend_user_id)
     _other_entry = create(:diary_entry, :user_id => users(:second_public_user).id)
 
     # Try a list of diary entries for your friends when not logged in