summaryrefslogtreecommitdiff
path: root/test/support/api_integration_test.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-07-10 12:13:30 +0200
committerAzul <azul@leap.se>2014-07-14 10:49:39 +0200
commit60052d15ca02b1c40ed265bed6515880d2851b8f (patch)
treee6946d2c25a04161c4f3003b1ef66ab9376938f4 /test/support/api_integration_test.rb
parent091793265e23452890c6ca27fc64feb54df2ad0b (diff)
clean up and simplify error responses and test code
Diffstat (limited to 'test/support/api_integration_test.rb')
-rw-r--r--test/support/api_integration_test.rb5
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