aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/response_test.rb
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2018-02-24 18:03:47 -0500
committerGitHub <noreply@github.com>2018-02-24 18:03:47 -0500
commit697dd48b5e5787126a91ce10739f8af31d1ffd1d (patch)
treecc4ff296f2096afe1a5fd3057f101213caac149a /actionpack/test/dispatch/response_test.rb
parent6f5cca77313e127313ea44c5c213fda3b9027a95 (diff)
parent3915a470d2b8898fdbc384d0f9f31e2ad8a2c899 (diff)
downloadrails-697dd48b5e5787126a91ce10739f8af31d1ffd1d.tar.gz
rails-697dd48b5e5787126a91ce10739f8af31d1ffd1d.tar.bz2
rails-697dd48b5e5787126a91ce10739f8af31d1ffd1d.zip
Merge branch 'master' into update_default_hsts_max_age
Diffstat (limited to 'actionpack/test/dispatch/response_test.rb')
-rw-r--r--actionpack/test/dispatch/response_test.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb
index 0b727dad3d..4c8d528507 100644
--- a/actionpack/test/dispatch/response_test.rb
+++ b/actionpack/test/dispatch/response_test.rb
@@ -15,13 +15,13 @@ class ResponseTest < ActiveSupport::TestCase
@response.await_commit
}
@response.commit!
- assert @response.committed?
+ assert_predicate @response, :committed?
assert t.join(0.5)
end
def test_stream_close
@response.stream.close
- assert @response.stream.closed?
+ assert_predicate @response.stream, :closed?
end
def test_stream_write
@@ -257,9 +257,9 @@ class ResponseTest < ActiveSupport::TestCase
}
resp.to_a
- assert resp.etag?
- assert resp.weak_etag?
- assert_not resp.strong_etag?
+ assert_predicate resp, :etag?
+ assert_predicate resp, :weak_etag?
+ assert_not_predicate resp, :strong_etag?
assert_equal('W/"202cb962ac59075b964b07152d234b70"', resp.etag)
assert_equal({ public: true }, resp.cache_control)
@@ -275,9 +275,9 @@ class ResponseTest < ActiveSupport::TestCase
}
resp.to_a
- assert resp.etag?
- assert_not resp.weak_etag?
- assert resp.strong_etag?
+ assert_predicate resp, :etag?
+ assert_not_predicate resp, :weak_etag?
+ assert_predicate resp, :strong_etag?
assert_equal('"202cb962ac59075b964b07152d234b70"', resp.etag)
end
@@ -356,7 +356,7 @@ class ResponseTest < ActiveSupport::TestCase
end
test "respond_to? accepts include_private" do
- assert_not @response.respond_to?(:method_missing)
+ assert_not_respond_to @response, :method_missing
assert @response.respond_to?(:method_missing, true)
end