diff options
author | Jorge Bejar <jorge@wyeworks.com> | 2015-07-06 21:33:19 -0300 |
---|---|---|
committer | Jorge Bejar <jorge@wyeworks.com> | 2015-12-09 10:53:41 -0300 |
commit | 83b4e9073f0852afc065ef398bd3ad9b5a6db29c (patch) | |
tree | dc2f2e814f8c6dcf4a1a0768c58c99e6d295d302 /actionpack/test/controller | |
parent | b79bfaadaf5b5c6d3e458c24184a0e846bd8cf55 (diff) | |
download | rails-83b4e9073f0852afc065ef398bd3ad9b5a6db29c.tar.gz rails-83b4e9073f0852afc065ef398bd3ad9b5a6db29c.tar.bz2 rails-83b4e9073f0852afc065ef398bd3ad9b5a6db29c.zip |
Response when error should be formatted properly in Rails API if local request
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/mime/respond_to_test.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/actionpack/test/controller/mime/respond_to_test.rb b/actionpack/test/controller/mime/respond_to_test.rb index c025c7fa00..76e2d3ff43 100644 --- a/actionpack/test/controller/mime/respond_to_test.rb +++ b/actionpack/test/controller/mime/respond_to_test.rb @@ -661,10 +661,6 @@ class RespondToControllerTest < ActionController::TestCase end def test_variant_inline_syntax - get :variant_inline_syntax, format: :js - assert_equal "text/javascript", @response.content_type - assert_equal "js", @response.body - get :variant_inline_syntax assert_equal "text/html", @response.content_type assert_equal "none", @response.body @@ -674,6 +670,12 @@ class RespondToControllerTest < ActionController::TestCase assert_equal "phone", @response.body end + def test_variant_inline_syntax_with_format + get :variant_inline_syntax, format: :js + assert_equal "text/javascript", @response.content_type + assert_equal "js", @response.body + end + def test_variant_inline_syntax_without_block get :variant_inline_syntax_without_block, params: { v: :phone } assert_equal "text/html", @response.content_type |