Namespace
Methods
- S
- T
-
- test_accessing_nonexistant_signed_cookie_should_not_raise_an_invalid_signature,
- test_can_set_http_cookie_header,
- test_can_set_request_cookies,
- test_cookie_with_all_domain_option,
- test_cookie_with_all_domain_option_and_tld_length,
- test_cookie_with_all_domain_option_using_a_non_standard_tld,
- test_cookie_with_all_domain_option_using_a_non_standard_tld_and_tld_length,
- test_cookie_with_all_domain_option_using_australian_style_tld,
- test_cookie_with_all_domain_option_using_host_with_port,
- test_cookie_with_all_domain_option_using_host_with_port_and_tld_length,
- test_cookie_with_all_domain_option_using_ipv4_address,
- test_cookie_with_all_domain_option_using_ipv6_address,
- test_cookie_with_all_domain_option_using_localhost,
- test_cookie_with_all_domain_option_using_uk_style_tld,
- test_cookie_with_several_preset_domains_using_one_of_these_domains,
- test_cookie_with_several_preset_domains_using_other_domain,
- test_cookie_with_several_preset_domains_using_shared_domain,
- test_cookies_can_be_cleared,
- test_cookies_hash_is_indifferent_access,
- test_cookies_persist_throughout_request,
- test_cookies_precedence_over_http_cookie,
- test_cookies_precedence_over_request_cookies,
- test_cookies_retained_across_requests,
- test_delete_and_set_cookie,
- test_delete_cookie_with_path,
- test_deleting_cookie_with_all_domain_option,
- test_deleting_cookie_with_all_domain_option_and_tld_length,
- test_deletings_cookie_with_several_preset_domains_using_one_of_these_domains,
- test_deletings_cookie_with_several_preset_domains_using_other_domain,
- test_each,
- test_enumerable,
- test_expiring_cookie,
- test_key_methods,
- test_multiple_cookies,
- test_not_setting_cookie_with_secure,
- test_permanent_cookie,
- test_permanent_signed_cookie,
- test_raise_data_overflow,
- test_raises_argument_error_if_missing_secret,
- test_raises_argument_error_if_secret_is_probably_insecure,
- test_setting_cookie,
- test_setting_cookie_for_fourteen_days,
- test_setting_cookie_for_fourteen_days_with_symbols,
- test_setting_cookie_with_http_only,
- test_setting_cookie_with_secure,
- test_setting_cookie_with_secure_when_always_write_cookie_is_true,
- test_setting_request_cookies_is_indifferent_access,
- test_setting_test_cookie,
- test_setting_the_same_value_to_cookie,
- test_setting_the_same_value_to_permanent_cookie,
- test_setting_with_escapable_characters,
- test_signed_cookie,
- test_tampered_cookies
Instance Public methods
setup()
Link
test_accessing_nonexistant_signed_cookie_should_not_raise_an_invalid_signature()
Link
test_cookie_with_all_domain_option_using_a_non_standard_tld_and_tld_length()
Link
test_cookie_with_all_domain_option_using_host_with_port_and_tld_length()
Link
test_deletings_cookie_with_several_preset_domains_using_one_of_these_domains()
Link
test_deletings_cookie_with_several_preset_domains_using_other_domain()
Link
test_each()
Link
test_enumerable()
Link
test_key_methods()
Link
test_raise_data_overflow()
Link
test_raises_argument_error_if_missing_secret()
Link
# File actionpack/test/dispatch/cookies_test.rb, line 306 def test_raises_argument_error_if_missing_secret assert_raise(ArgumentError, nil.inspect) { @request.env["action_dispatch.secret_token"] = nil get :set_signed_cookie } assert_raise(ArgumentError, ''.inspect) { @request.env["action_dispatch.secret_token"] = "" get :set_signed_cookie } end
test_raises_argument_error_if_secret_is_probably_insecure()
Link
# File actionpack/test/dispatch/cookies_test.rb, line 318 def test_raises_argument_error_if_secret_is_probably_insecure assert_raise(ArgumentError, "password".inspect) { @request.env["action_dispatch.secret_token"] = "password" get :set_signed_cookie } assert_raise(ArgumentError, "secret".inspect) { @request.env["action_dispatch.secret_token"] = "secret" get :set_signed_cookie } assert_raise(ArgumentError, "12345678901234567890123456789".inspect) { @request.env["action_dispatch.secret_token"] = "12345678901234567890123456789" get :set_signed_cookie } end
test_setting_with_escapable_characters()
Link
# File actionpack/test/dispatch/cookies_test.rb, line 194 def test_setting_with_escapable_characters get :set_with_with_escapable_characters assert_cookie_header "that+%26+guy=foo+%26+bar+%3D%3E+baz; path=/" assert_equal({"that & guy" => "foo & bar => baz"}, @response.cookies) end