diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2015-12-09 15:26:46 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2015-12-09 15:26:46 -0300 |
commit | b11bca98bf5431ce9522c6b5707f51cd8d7f401c (patch) | |
tree | f665325e17cb88cdc8b8ae3ef8750806a02ed0c3 /actionpack/test/controller | |
parent | b05801754f6423a1d90954ef3f6e2f5dc55c6320 (diff) | |
parent | cdb7a8477ff19f8ed6f549cedc901bd5934a61e8 (diff) | |
download | rails-b11bca98bf5431ce9522c6b5707f51cd8d7f401c.tar.gz rails-b11bca98bf5431ce9522c6b5707f51cd8d7f401c.tar.bz2 rails-b11bca98bf5431ce9522c6b5707f51cd8d7f401c.zip |
Merge pull request #20831 from jmbejar/rails-api-json-error-response
Rails API: Ability to return error responses in json format also in development
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 |