fix ul tests

This commit is contained in:
John McLear 2015-01-19 15:37:29 +00:00
parent 3463b16d1a
commit 5967e085b7
1 changed files with 4 additions and 3 deletions

View File

@ -12,7 +12,7 @@ var apiVersion = 1;
var testPadId = makeid(); var testPadId = makeid();
var lastEdited = ""; var lastEdited = "";
var text = generateLongText(); var text = generateLongText();
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>'; 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>';
describe('Connectivity', function(){ describe('Connectivity', function(){
it('errors if can not connect', function(done) { it('errors if can not connect', function(done) {
@ -450,8 +450,9 @@ describe('getHTML', function(){
it('Gets the HTML of a Pad with a bunch of weird unordered lists inserted', function(done) { it('Gets the HTML of a Pad with a bunch of weird unordered lists inserted', function(done) {
api.get(endPoint('getHTML')+"&padID="+testPadId) api.get(endPoint('getHTML')+"&padID="+testPadId)
.expect(function(res){ .expect(function(res){
console.log("foo", res.body.data.html); var ehtml = res.body.data.html.replace("<br></body>", "</body>").toLowerCase();
if(res.body.data !== ULhtml) throw new Error("Imported HTML does not match served HTML") var uhtml = ULhtml.toLowerCase();
if(ehtml !== uhtml) throw new Error("Imported HTML does not match served HTML")
}) })
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
.expect(200, done) .expect(200, done)