Permalink
Browse files

Merge pull request #1625 from neerajdotname/page_caching

Three minor fixes to tests
  • Loading branch information...
josevalim committed Jun 10, 2011
2 parents 0b02284 + 06d772c commit 2bda229c2fa16691efb06093613ce3232d49c1b1
Showing with 3 additions and 2 deletions.
  1. +2 −2 actionpack/test/controller/caching_test.rb
  2. +1 −0 actionpack/test/controller/content_type_test.rb
@@ -127,7 +127,7 @@ def test_should_obey_http_accept_attribute
assert_equal 'I am xml', @response.body
end
- def test_should_cache_with_trailing_slash_on_url
+ def test_cached_page_should_not_have_trailing_slash_even_if_url_has_trailing_slash
@controller.class.cache_page 'cached content', '/page_caching_test/trailing_slash/'
assert File.exist?("#{FILE_STORE_PATH}/page_caching_test/trailing_slash.html")
end
@@ -141,7 +141,7 @@ def test_should_cache_ok_at_custom_path
[:ok, :no_content, :found, :not_found].each do |status|
[:get, :post, :put, :delete].each do |method|
- unless method == :get and status == :ok
+ unless method == :get && status == :ok
define_method "test_shouldnt_cache_#{method}_with_#{status}_status" do
send(method, status)
assert_response status
@@ -74,6 +74,7 @@ def test_render_changed_charset_default
get :render_defaults
assert_equal "utf-16", @response.charset
assert_equal Mime::HTML, @response.content_type
+ ensure
OldContentTypeController.default_charset = "utf-8"
end

0 comments on commit 2bda229

Please sign in to comment.