diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-12-19 13:49:54 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-12-19 14:19:41 -0200 |
commit | 3b10ad08742b68a83ea1bb347f842a295dc63b93 (patch) | |
tree | 21fe65c15f17967546ca0b6cd0892858cab6acc6 | |
parent | 553b2a74fa265987bd4216ad461032dbf7e73121 (diff) | |
download | rails-3b10ad08742b68a83ea1bb347f842a295dc63b93.tar.gz rails-3b10ad08742b68a83ea1bb347f842a295dc63b93.tar.bz2 rails-3b10ad08742b68a83ea1bb347f842a295dc63b93.zip |
Fix assertions for testing unknown formats using Mime::NullType
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index b308c5749a..f79fe47897 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -606,7 +606,7 @@ class RequestTest < ActiveSupport::TestCase 'HTTP_X_REQUESTED_WITH' => "XMLHttpRequest" request.expects(:parameters).at_least_once.returns({}) assert_equal [Mime::JS], request.formats - + request = stub_request 'CONTENT_TYPE' => 'application/xml; charset=UTF-8', 'HTTP_X_REQUESTED_WITH' => "XMLHttpRequest" request.expects(:parameters).at_least_once.returns({}) @@ -624,10 +624,10 @@ class RequestTest < ActiveSupport::TestCase test "format is not nil with unknown format" do request = stub_request request.expects(:parameters).at_least_once.returns({ format: :hello }) - assert_equal request.format.nil?, true - assert_equal request.format.html?, false - assert_equal request.format.xml?, false - assert_equal request.format.json?, false + assert request.format.nil? + assert_not request.format.html? + assert_not request.format.xml? + assert_not request.format.json? end test "formats with xhr request" do |