]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/user_controller_test.rb
Add a note_with_comments factory
[rails.git] / test / controllers / user_controller_test.rb
index a621316965f8dc246a9a75c682d89b121359a751..6a5fca78563af0077ae27c80c2dceb33032dbcbf 100644 (file)
@@ -2,7 +2,7 @@ require "test_helper"
 
 class UserControllerTest < ActionController::TestCase
   api_fixtures
-  fixtures :messages, :friends
+  fixtures :messages
 
   ##
   # test all routes which lead to this controller
@@ -523,6 +523,7 @@ class UserControllerTest < ActionController::TestCase
   def test_confirm_email_success
     user = users(:second_public_user)
     confirm_string = user.tokens.create.token
+
     post :confirm_email, :confirm_string => confirm_string
     assert_response :redirect
     assert_redirected_to :action => :account, :display_name => user.display_name
@@ -1190,6 +1191,7 @@ class UserControllerTest < ActionController::TestCase
     # Get users to work with
     user = users(:normal_user)
     friend = users(:public_user)
+    create(:friend, :user_id => user.id, :friend_user_id => friend.id)
 
     # Check that the users are friends
     assert Friend.where(:user_id => user.id, :friend_user_id => friend.id).first
@@ -1230,6 +1232,7 @@ class UserControllerTest < ActionController::TestCase
     # Get users to work with
     user = users(:normal_user)
     friend = users(:public_user)
+    create(:friend, :user_id => user.id, :friend_user_id => friend.id)
 
     # Check that the users are friends
     assert Friend.where(:user_id => user.id, :friend_user_id => friend.id).first