aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/action_pack_assertions_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/action_pack_assertions_test.rb')
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index 4c0382a32c..48d7ed2f3f 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -337,6 +337,13 @@ class ActionPackAssertionsControllerTest < Test::Unit::TestCase
assert_equal "Mr. David", @response.body
end
+ def test_assert_template_xpath_match_no_matches
+ process :hello_xml_world
+ assert_raises Test::Unit::AssertionFailedError do
+ assert_template_xpath_match('/no/such/node/in/document')
+ end
+ end
+
def test_simple_one_element_xpath_match
process :hello_xml_world
assert_template_xpath_match('//title', "Hello World")