aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/text_helper_test.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-09-23 18:14:44 +0000
committerRick Olson <technoweenie@gmail.com>2007-09-23 18:14:44 +0000
commitc61900385452e50bd825f1ab5abef95bc969fadc (patch)
treed4fb78ed415dbb9dd69c0468eef0d039bf2817bc /actionpack/test/template/text_helper_test.rb
parentda0725aae3c08543dcc39446236a5a1fc55a9136 (diff)
downloadrails-c61900385452e50bd825f1ab5abef95bc969fadc.tar.gz
rails-c61900385452e50bd825f1ab5abef95bc969fadc.tar.bz2
rails-c61900385452e50bd825f1ab5abef95bc969fadc.zip
Rename some RequestForgeryProtection methods. The class method is now #protect_from_forgery, and the default parameter is now 'authenticity_token'. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/text_helper_test.rb')
-rw-r--r--actionpack/test/template/text_helper_test.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index 80b9c773b3..979e436556 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -289,7 +289,7 @@ class TextHelperTest < Test::Unit::TestCase
assert_sanitized raw, %{src="javascript:bang" <img width="5">foo</img>, <span>bar</span>}
end
- ActionView::Base.sanitized_allowed_tags.each do |tag_name|
+ ActionView::Helpers::TextHelper.sanitized_allowed_tags.each do |tag_name|
define_method "test_should_allow_#{tag_name}_tag" do
assert_sanitized "start <#{tag_name} title=\"1\" onclick=\"foo\">foo <bad>bar</bad> baz</#{tag_name}> end", %(start <#{tag_name} title="1">foo bar baz</#{tag_name}> end)
end
@@ -551,11 +551,4 @@ class TextHelperTest < Test::Unit::TestCase
def assert_sanitized(text, expected = nil)
assert_equal((expected || text), sanitize(text))
end
-
- # pull in configuration values from ActionView::Base
- [:sanitized_protocol_separator, :sanitized_protocol_attributes, :sanitized_bad_tags, :sanitized_allowed_tags, :sanitized_allowed_attributes, :sanitized_allowed_protocols, :sanitized_allowed_css_properties, :sanitized_allowed_css_keywords, :sanitized_shorthand_css_properties, :sanitized_uri_attributes].each do |attr|
- define_method attr do
- ActionView::Base.send(attr)
- end
- end
end