File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ var apiVersion = 1;
1212var testPadId = makeid ( ) ;
1313var lastEdited = "" ;
1414var text = generateLongText ( ) ;
15- var ULhtml = '<!DOCTYPE html><html><body><ul class="bullet"><li>one</li><li>2</li></ul><br><ul class="bullet" ><ul class="bullet"><li>UL2</li></ul></ul></body></html>' ;
15+ var ULhtml = '<!DOCTYPE html><html><body><ul class="bullet"><li>one</li><li>2</li></ul><br><ul><ul class="bullet"><li>UL2</li></ul></ul></body></html>' ;
1616
1717describe ( 'Connectivity' , function ( ) {
1818 it ( 'errors if can not connect' , function ( done ) {
@@ -450,8 +450,9 @@ describe('getHTML', function(){
450450 it ( 'Gets the HTML of a Pad with a bunch of weird unordered lists inserted' , function ( done ) {
451451 api . get ( endPoint ( 'getHTML' ) + "&padID=" + testPadId )
452452 . expect ( function ( res ) {
453- console . log ( "foo" , res . body . data . html ) ;
454- if ( res . body . data !== ULhtml ) throw new Error ( "Imported HTML does not match served HTML" )
453+ var ehtml = res . body . data . html . replace ( "<br></body>" , "</body>" ) . toLowerCase ( ) ;
454+ var uhtml = ULhtml . toLowerCase ( ) ;
455+ if ( ehtml !== uhtml ) throw new Error ( "Imported HTML does not match served HTML" )
455456 } )
456457 . expect ( 'Content-Type' , / j s o n / )
457458 . expect ( 200 , done )
You can’t perform that action at this time.
0 commit comments