diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2015-10-06 11:30:02 -0700 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2015-10-06 11:30:02 -0700 |
commit | 71317e6406dba9a552760ec035b67b3c16162528 (patch) | |
tree | 78cc5fc25b114c26e14d855370e16139dbd4b679 /actionpack/test/controller/webservice_test.rb | |
parent | 5b69e30622de27e8010fd8cb32a97b5f0fe194e2 (diff) | |
parent | 565094a8b5cdfa158fef6ae75252fd98a4ba8fe4 (diff) | |
download | rails-71317e6406dba9a552760ec035b67b3c16162528.tar.gz rails-71317e6406dba9a552760ec035b67b3c16162528.tar.bz2 rails-71317e6406dba9a552760ec035b67b3c16162528.zip |
Merge pull request #21869 from jeremy/mime-constant-deprecation
Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compat
Diffstat (limited to 'actionpack/test/controller/webservice_test.rb')
-rw-r--r-- | actionpack/test/controller/webservice_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/controller/webservice_test.rb b/actionpack/test/controller/webservice_test.rb index 2aee914a24..6d377c4691 100644 --- a/actionpack/test/controller/webservice_test.rb +++ b/actionpack/test/controller/webservice_test.rb @@ -65,7 +65,7 @@ class WebServiceTest < ActionDispatch::IntegrationTest def test_register_and_use_json_simple with_test_route_set do - with_params_parsers Mime::Type[:JSON] => Proc.new { |data| ActiveSupport::JSON.decode(data)['request'].with_indifferent_access } do + with_params_parsers Mime[:json] => Proc.new { |data| ActiveSupport::JSON.decode(data)['request'].with_indifferent_access } do post "/", params: '{"request":{"summary":"content...","title":"JSON"}}', headers: { 'CONTENT_TYPE' => 'application/json' } @@ -99,7 +99,7 @@ class WebServiceTest < ActionDispatch::IntegrationTest def test_parsing_json_doesnot_rescue_exception req = Class.new(ActionDispatch::Request) do def params_parsers - { Mime::Type[:JSON] => Proc.new { |data| raise Interrupt } } + { Mime[:json] => Proc.new { |data| raise Interrupt } } end def content_length; get_header('rack.input').length; end |