diff options
Diffstat (limited to 'test/functional/v1/users_controller_test.rb')
-rw-r--r-- | test/functional/v1/users_controller_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/v1/users_controller_test.rb b/test/functional/v1/users_controller_test.rb index 7cd9b0c..fe3cfe7 100644 --- a/test/functional/v1/users_controller_test.rb +++ b/test/functional/v1/users_controller_test.rb @@ -71,4 +71,12 @@ class V1::UsersControllerTest < ActionController::TestCase assert assigns(:users) end + test "create returns forbidden if registration is closed" do + user_attribs = record_attributes_for :user + with_config(allow_registration: false) do + post :create, :user => user_attribs, :format => :json + assert_response :forbidden + end + end + end |