aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test
diff options
context:
space:
mode:
authorTimm <kaspth@gmail.com>2013-09-22 21:08:30 +0200
committerTimm <kaspth@gmail.com>2014-06-16 21:04:16 +0200
commit9ef95a7019fc531ff74a91f0ca0871e6639990b7 (patch)
tree4b86741c9664f72a32c4240947c9789437f0b527 /actionview/test
parent535a3b6af7a41ce33356c36296acd26786de7e55 (diff)
downloadrails-9ef95a7019fc531ff74a91f0ca0871e6639990b7.tar.gz
rails-9ef95a7019fc531ff74a91f0ca0871e6639990b7.tar.bz2
rails-9ef95a7019fc531ff74a91f0ca0871e6639990b7.zip
Added deprecation warning for invalid selectors and skipping assertions.
Diffstat (limited to 'actionview/test')
-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">