Methods
Instance Public methods
test_array()
Link
test_etag_reflects_template_digest()
Link
# File actionpack/test/controller/render_test.rb, line 522 def test_etag_reflects_template_digest get :with_template assert_response :ok assert_not_nil etag = @response.etag request.if_none_match = etag get :with_template assert_response :not_modified # Modify the template digest path = File.expand_path('../../fixtures/test/hello_world.erb', __FILE__) old = File.read(path) begin File.write path, 'foo' ActionView::LookupContext::DetailsKey.clear request.if_none_match = etag get :with_template assert_response :ok assert_not_equal etag, @response.etag ensure File.write path, old end end
test_strong_etag()
Link
# File actionpack/test/controller/render_test.rb, line 484 def test_strong_etag @request.if_none_match = strong_etag(['strong', 'ab', :cde, [:f]]) get :strong assert_response :not_modified @request.if_none_match = '*' get :strong assert_response :not_modified @request.if_none_match = '"strong"' get :strong assert_response :ok @request.if_none_match = weak_etag(['strong', 'ab', :cde, [:f]]) get :strong assert_response :ok end