From 5bf41ed8bcb8e9a15e2290e2e72a7aaffafa31b5 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Sat, 9 Sep 2006 22:05:21 +0000 Subject: Add test case to test attribute matching by assert_tag git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5082 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/test_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index 29584ac201..c9a30f9332 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -291,6 +291,16 @@ HTML :only => { :tag => "img" } } } } end + def test_assert_tag_attribute_matching + @response.body = '' + assert_tag :tag => 'input', + :attributes => { :name => /my/, :type => 'text' } + assert_no_tag :tag => 'input', + :attributes => { :name => 'my', :type => 'text' } + assert_no_tag :tag => 'input', + :attributes => { :name => /^my$/, :type => 'text' } + end + def test_assert_generates assert_generates 'controller/action/5', :controller => 'controller', :action => 'action', :id => '5' end -- cgit v1.2.3