diff options
author | John McLear <john@mclear.co.uk> | 2015-01-19 15:37:29 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2015-01-19 15:37:29 +0000 |
commit | 5967e085b7bc7efe8ab9ab1be8c728763b3f876a (patch) | |
tree | 805be75ae7c1f1854f088d90b240133db69db87b | |
parent | 3463b16d1aab4277c24aef11fcb93c15f30b35da (diff) | |
download | etherpad-lite-5967e085b7bc7efe8ab9ab1be8c728763b3f876a.zip |
fix ul tests
-rw-r--r-- | tests/backend/specs/api/pad.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/backend/specs/api/pad.js b/tests/backend/specs/api/pad.js index 49800e6f..3527f95a 100644 --- a/tests/backend/specs/api/pad.js +++ b/tests/backend/specs/api/pad.js @@ -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) { @@ -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) |