diff options
author | Azul <azul@leap.se> | 2014-07-17 11:18:57 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-07-17 11:18:57 +0200 |
commit | e8a3df62d14c8dd775811f4af885cf7e76d5d3f6 (patch) | |
tree | 99905fc826fbcdf0634be3b31945e6df8c7e7a1e /test/support/rack_test.rb | |
parent | bb10a669e1129c662ba01f223bd5a0ee7f2a0344 (diff) |
clean up error assertions in tests
We're not testing the redirects anymore. But the error messages should be pretty clear already. We can start testing redirects again once we redirect to different places for different actions.
Diffstat (limited to 'test/support/rack_test.rb')
-rw-r--r-- | test/support/rack_test.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/test/support/rack_test.rb b/test/support/rack_test.rb index 83adf6c..2c9fa9a 100644 --- a/test/support/rack_test.rb +++ b/test/support/rack_test.rb @@ -3,6 +3,7 @@ require_relative 'assert_responses' class RackTest < ActiveSupport::TestCase include Rack::Test::Methods include Warden::Test::Helpers + include AssertResponses CONFIG_RU = (Rails.root + 'config.ru').to_s OUTER_APP = Rack::Builder.parse_file(CONFIG_RU).first @@ -11,16 +12,6 @@ class RackTest < ActiveSupport::TestCase OUTER_APP end - def assert_access_denied - assert_json_response('error' => I18n.t(:not_authorized)) - 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 # -> actionpack/lib/action_dispatch/testing/assertions/response.rb def assert_response(type, message = nil) |