aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/template')
-rw-r--r--actionview/test/template/assert_select_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionview/test/template/assert_select_test.rb b/actionview/test/template/assert_select_test.rb
index 42d6bb4432..af1ddb5c12 100644
--- a/actionview/test/template/assert_select_test.rb
+++ b/actionview/test/template/assert_select_test.rb
@@ -266,6 +266,17 @@ class AssertSelectTest < ActionController::TestCase
end
end
+ # testing invalid selectors
+ def test_assert_select_with_invalid_selector
+ render_html '<a href="http://example.com">hello</a>'
+ assert_nil assert_select("[href=http://example.com]")
+ end
+
+ def test_css_select_with_invalid_selector
+ render_html '<a href="http://example.com">hello</a>'
+ assert_nil css_select("[href=http://example.com]")
+ end
+
def test_feed_item_encoded
render_xml <<-EOF
<rss version="2.0">