Skip to content

Commit

Permalink
fix ul tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMcLear committed Jan 19, 2015
1 parent 3463b16 commit 5967e08
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/backend/specs/api/pad.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var apiVersion = 1;
var testPadId = makeid();
var lastEdited = "";
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(){
it('errors if can not connect', function(done) {
Expand Down Expand Up @@ -450,8 +450,9 @@ describe('getHTML', function(){
it('Gets the HTML of a Pad with a bunch of weird unordered lists inserted', function(done) {
api.get(endPoint('getHTML')+"&padID="+testPadId)
.expect(function(res){
console.log("foo", res.body.data.html);
if(res.body.data !== ULhtml) throw new Error("Imported HTML does not match served HTML")
var ehtml = res.body.data.html.replace("<br></body>", "</body>").toLowerCase();
var uhtml = ULhtml.toLowerCase();
if(ehtml !== uhtml) throw new Error("Imported HTML does not match served HTML")
})
.expect('Content-Type', /json/)
.expect(200, done)
Expand Down

0 comments on commit 5967e08

Please sign in to comment.