Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4859

Show
Ignore:
Timestamp:
08/29/06 23:32:53 (2 years ago)
Author:
madrobby
Message:

Prototype: cleanup dom.html unit tests for table updates [Rick Olson]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/prototype/test/unit/dom.html

    r4857 r4859  
    7979    }}, 
    8080     
    81     testElementUpdateInTable: function() {with(this) { 
     81    testElementUpdateInTableRow: function() {with(this) { 
    8282      $('second_row').update('<td id="i_am_a_td">test</td>'); 
    8383      assertEqual('test',$('i_am_a_td').innerHTML); 
     
    8585      Element.update('second_row','<td id="i_am_a_td">another <span>test</span></td>'); 
    8686      assertEqual('another <span>test</span>',$('i_am_a_td').innerHTML.toLowerCase()); 
    87        
     87    }}, 
     88     
     89    testElementUpdateInTableCell: function() {with(this) { 
    8890      Element.update('a_cell','another <span>test</span>'); 
    8991      assertEqual('another <span>test</span>',$('a_cell').innerHTML.toLowerCase()); 
    90        
     92    }}, 
     93     
     94    testElementUpdateInTable: function() {with(this) { 
    9195      Element.update('table','<tr><td>boo!</td></tr>'); 
    92       assertEqual('<tr><td>boo!</td></tr>',$('table').innerHTML.toLowerCase()); 
     96      assertMatch(/^<tr>\s*<td>boo!<\/td><\/tr>$/,$('table').innerHTML.toLowerCase()); 
    9397    }} 
    9498