diff options
author | Jamis Buck <jamis@37signals.com> | 2006-09-09 22:05:21 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-09-09 22:05:21 +0000 |
commit | 5bf41ed8bcb8e9a15e2290e2e72a7aaffafa31b5 (patch) | |
tree | 13d349d64f97e883394b1f5654c8d8bd22a644f3 /actionpack/test | |
parent | 45b5555f4cefaa61456e618e732c9ee5bb5b4e83 (diff) | |
download | rails-5bf41ed8bcb8e9a15e2290e2e72a7aaffafa31b5.tar.gz rails-5bf41ed8bcb8e9a15e2290e2e72a7aaffafa31b5.tar.bz2 rails-5bf41ed8bcb8e9a15e2290e2e72a7aaffafa31b5.zip |
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
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/test_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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 = '<input type="text" name="my_name">' + 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 |