From 140155f32a9bd8ef2d5a581a1e56701a44a8f5a7 Mon Sep 17 00:00:00 2001 From: Folker Bernitt Date: Thu, 10 Jul 2014 17:58:32 +0200 Subject: Added allow_registration toggle. - default is true - See issue #5217 - See companion change in leap_platform. --- test/functional/users_controller_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/functional/users_controller_test.rb') diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index 0713836..4af9ca6 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -162,4 +162,11 @@ class UsersControllerTest < ActionController::TestCase assert !assigns(:user).enabled? end + test "new redirects if registration is closed" do + with_config(allow_registration: false) do + get :new + assert_response :redirect + assert_redirected_to home_path + end + end end -- cgit v1.2.3