diff options
Diffstat (limited to 'test/support/api_integration_test.rb')
-rw-r--r-- | test/support/api_integration_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/support/api_integration_test.rb b/test/support/api_integration_test.rb index bd10f11..ccf7066 100644 --- a/test/support/api_integration_test.rb +++ b/test/support/api_integration_test.rb @@ -14,6 +14,11 @@ class ApiIntegrationTest < ActionDispatch::IntegrationTest @token.save end + def assert_login_required + assert_equal 401, get_response.status + assert_json_response error: I18n.t(:not_authorized_login) + end + teardown do if @user && @user.persisted? Identity.destroy_all_for @user |