]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/diary_entry_controller_test.rb
merge upstream/master and resolve conflicts from https://github.com/openstreetmap...
[rails.git] / test / controllers / diary_entry_controller_test.rb
index 6ebf4ec0912fef585f6e733915cd0c9bb8c7b994..d926f26569e1781ff12f96a9fb91ffdf9c83f8d4 100644 (file)
@@ -1,7 +1,7 @@
 require "test_helper"
 
 class DiaryEntryControllerTest < ActionController::TestCase
 require "test_helper"
 
 class DiaryEntryControllerTest < ActionController::TestCase
-  fixtures :users, :user_roles, :languages, :friends
+  fixtures :users, :user_roles, :languages
 
   include ActionView::Helpers::NumberHelper
 
 
   include ActionView::Helpers::NumberHelper
 
@@ -440,7 +440,8 @@ class DiaryEntryControllerTest < ActionController::TestCase
   end
 
   def test_list_friends
   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
     _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