diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-23 21:56:52 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-09-23 21:56:52 +0000 |
commit | 7d9fe04b1d87b9f346649c9385a3c95121132653 (patch) | |
tree | 4df4db318434d4c4715031e2826b21f3b51dd782 /actionpack/test | |
parent | a6f49d9b786bfcc049a99f843de8e4d838de1179 (diff) | |
download | rails-7d9fe04b1d87b9f346649c9385a3c95121132653.tar.gz rails-7d9fe04b1d87b9f346649c9385a3c95121132653.tar.bz2 rails-7d9fe04b1d87b9f346649c9385a3c95121132653.zip |
Fixed cache_page to use the request url instead of the routing options when picking a save path (closes #8614) [josh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7598 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index 43babca5ab..6aab2e8dce 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -92,6 +92,15 @@ class PageCachingTest < Test::Unit::TestCase assert !File.exist?("#{FILE_STORE_PATH}/index.html") end + uses_mocha("should_cache_ok_at_custom_path") do + def test_should_cache_ok_at_custom_path + @request.expects(:path).returns("/index.html") + get :ok + assert_response :ok + assert File.exist?("#{FILE_STORE_PATH}/index.html") + end + end + [:ok, :no_content, :found, :not_found].each do |status| [:get, :post, :put, :delete].each do |method| unless method == :get and status == :ok |