diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-07-10 17:58:32 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2014-07-11 10:44:21 +0200 |
commit | 140155f32a9bd8ef2d5a581a1e56701a44a8f5a7 (patch) | |
tree | 858f22fd9167b490b8b3fcaed2884215d0f0018a /test/functional/users_controller_test.rb | |
parent | c9dd5a342f902b27aec73af24776025a03feda48 (diff) |
Added allow_registration toggle.
- default is true
- See issue #5217
- See companion change in leap_platform.
Diffstat (limited to 'test/functional/users_controller_test.rb')
-rw-r--r-- | test/functional/users_controller_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |