Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Minor test improvement #5368

Merged
merged 1 commit into from

4 participants

@andhapp

Removed max-stale from the tests since it's a request cache-control directive, just for clarity sake.

@isaacsanders

Is this still an issue?

@andhapp

This wasn't an issue really. I just improved the test.

@rafaelfranca
Owner

@josevalim can you verify if this PR?

Thanks

@josevalim josevalim merged commit fef110d into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 10, 2012
  1. @andhapp

    Removed max-stale from the tests since it's a request cache-control d…

    andhapp authored
    …irective, just for clarity sake.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/test/controller/render_test.rb
View
8 actionpack/test/controller/render_test.rb
@@ -102,12 +102,12 @@ def conditional_hello_with_expires_in_with_public_and_must_revalidate
end
def conditional_hello_with_expires_in_with_public_with_more_keys
- expires_in 1.minute, :public => true, 'max-stale' => 5.hours
+ expires_in 1.minute, :public => true, 's-maxage' => 5.hours
render :action => 'hello_world'
end
def conditional_hello_with_expires_in_with_public_with_more_keys_old_syntax
- expires_in 1.minute, :public => true, :private => nil, 'max-stale' => 5.hours
+ expires_in 1.minute, :public => true, :private => nil, 's-maxage' => 5.hours
render :action => 'hello_world'
end
@@ -1421,12 +1421,12 @@ def test_expires_in_header_with_public_and_must_revalidate
def test_expires_in_header_with_additional_headers
get :conditional_hello_with_expires_in_with_public_with_more_keys
- assert_equal "max-age=60, public, max-stale=18000", @response.headers["Cache-Control"]
+ assert_equal "max-age=60, public, s-maxage=18000", @response.headers["Cache-Control"]
end
def test_expires_in_old_syntax
get :conditional_hello_with_expires_in_with_public_with_more_keys_old_syntax
- assert_equal "max-age=60, public, max-stale=18000", @response.headers["Cache-Control"]
+ assert_equal "max-age=60, public, s-maxage=18000", @response.headers["Cache-Control"]
end
def test_expires_now
Something went wrong with that request. Please try again.