X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d058f3ef28d498b117c8d32c54d5e61778259bca..596494a5901ceff765fe3cf35fe4a051b973cc79:/test/controllers/user_controller_test.rb diff --git a/test/controllers/user_controller_test.rb b/test/controllers/user_controller_test.rb index c3a111605..409a93b4e 100644 --- a/test/controllers/user_controller_test.rb +++ b/test/controllers/user_controller_test.rb @@ -2,7 +2,6 @@ require "test_helper" class UserControllerTest < ActionController::TestCase api_fixtures - fixtures :messages ## # test all routes which lead to this controller @@ -1036,6 +1035,8 @@ class UserControllerTest < ActionController::TestCase end def test_api_details + create(:message, :read, :recipient => users(:normal_user)) + # check that nothing is returned when not logged in get :api_details assert_response :unauthorized @@ -1193,7 +1194,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) + create(:friend, :befriender => user, :befriendee => friend) # Check that the users are friends assert Friend.where(:user_id => user.id, :friend_user_id => friend.id).first