Skip to content

Commit 5967e08

Browse files
committed
fix ul tests
1 parent 3463b16 commit 5967e08

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/backend/specs/api/pad.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var apiVersion = 1;
1212
var testPadId = makeid();
1313
var lastEdited = "";
1414
var 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

1717
describe('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', /json/)
457458
.expect(200, done)

0 commit comments

Comments
 (0)