X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/90b7101cc3e312a7e25fc6dfd3aec1079bfda4b8..99ccffe4a9c0521d1202c4f0f1a37f8ef2dc0634:/test/controllers/user_controller_test.rb diff --git a/test/controllers/user_controller_test.rb b/test/controllers/user_controller_test.rb index a62131696..14bea6374 100644 --- a/test/controllers/user_controller_test.rb +++ b/test/controllers/user_controller_test.rb @@ -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 @@ -923,6 +924,7 @@ class UserControllerTest < ActionController::TestCase end # Test a user who has been blocked + create(:user_block, :user => users(:blocked_user)) get :view, :display_name => "blocked" assert_response :success assert_select "div#userinformation" do @@ -937,6 +939,7 @@ class UserControllerTest < ActionController::TestCase end # Test a moderator who has applied blocks + create(:user_block, :creator => users(:moderator_user)) get :view, :display_name => "moderator" assert_response :success assert_select "div#userinformation" do @@ -1190,6 +1193,7 @@ class UserControllerTest < ActionController::TestCase # Get users to work with user = users(:normal_user) friend = users(:public_user) + 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 @@ -1230,6 +1234,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