diff options
author | Azul <azul@leap.se> | 2014-07-10 12:13:30 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-07-14 10:49:39 +0200 |
commit | 60052d15ca02b1c40ed265bed6515880d2851b8f (patch) | |
tree | e6946d2c25a04161c4f3003b1ef66ab9376938f4 /test/support/rack_test.rb | |
parent | 091793265e23452890c6ca27fc64feb54df2ad0b (diff) |
clean up and simplify error responses and test code
Diffstat (limited to 'test/support/rack_test.rb')
-rw-r--r-- | test/support/rack_test.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/support/rack_test.rb b/test/support/rack_test.rb index 806339a..83adf6c 100644 --- a/test/support/rack_test.rb +++ b/test/support/rack_test.rb @@ -13,7 +13,12 @@ class RackTest < ActiveSupport::TestCase def assert_access_denied assert_json_response('error' => I18n.t(:not_authorized)) - assert_response :unprocessable_entity + assert_response :forbidden + end + + def assert_login_required + assert_json_response('error' => I18n.t(:not_authorized_login)) + assert_response :unauthorized end # inspired by rails 4 |