X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d7f41756f9f8b61223b8bd04e7cadb34342dd4a1..bdd0cb3176d9afe37201cb64f91b99b367a846df:/test/controllers/users_controller_test.rb diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index 57dddc258..deb736a7b 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -323,6 +323,22 @@ class UsersControllerTest < ActionController::TestCase assert_select "form > fieldset > div.form-row > input.field_with_errors#user_display_name" end + def test_new_blocked_domain + user = build(:user, :pending, :email => "user@example.net") + create(:acl, :domain => "example.net", :k => "no_account_creation") + + assert_no_difference "User.count" do + assert_no_difference "ActionMailer::Base.deliveries.size" do + perform_enqueued_jobs do + post :save, :session => { :new_user => user } + end + end + end + + assert_response :success + assert_template "blocked" + end + def test_save_referer_params user = build(:user, :pending) @@ -989,6 +1005,8 @@ class UsersControllerTest < ActionController::TestCase user = create(:user, :home_lon => 1.1, :home_lat => 1.1) friend_user = create(:user, :home_lon => 1.2, :home_lat => 1.2) create(:friend, :befriender => user, :befriendee => friend_user) + create(:changeset, :user => friend_user) + get :show, :params => { :display_name => user.display_name } assert_response :success assert_select "div#userinformation" do