aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-28 13:20:52 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-28 13:20:52 -0800
commit764397f17d4140232c1aa62bc593b3e5f25485e7 (patch)
tree95255bee92b4a5a8129bfd8380c88a984bcc38dc /actionpack/test
parent8fff05ad3212e4302f186ca154a120f00d1b6abd (diff)
parent489138802c3d5f2cdafc8cea22eac0da446099cc (diff)
downloadrails-764397f17d4140232c1aa62bc593b3e5f25485e7.tar.gz
rails-764397f17d4140232c1aa62bc593b3e5f25485e7.tar.bz2
rails-764397f17d4140232c1aa62bc593b3e5f25485e7.zip
Merge pull request #9098 from firmhouse/add-head-requests
Make current_url? work with HEAD requests and remove caching_allowed? since it doesn't do anything
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/url_helper_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/template/url_helper_test.rb b/actionpack/test/template/url_helper_test.rb
index ba65349b6a..5d87c96605 100644
--- a/actionpack/test/template/url_helper_test.rb
+++ b/actionpack/test/template/url_helper_test.rb
@@ -437,6 +437,12 @@ class UrlHelperTest < ActiveSupport::TestCase
ActionDispatch::Request.new(env)
end
+ def test_current_page_with_http_head_method
+ @request = request_for_url("/", :method => :head)
+ assert current_page?(url_hash)
+ assert current_page?("http://www.example.com/")
+ end
+
def test_current_page_with_simple_url
@request = request_for_url("/")
assert current_page?(url_hash)