Not a perfect test, but it'll do for now.

This commit is contained in:
Andrew Naylor 2015-03-08 14:32:53 +00:00
Родитель db2481164a
Коммит 286f1e14d6
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -167,6 +167,14 @@ describe("Notification", function() {
expect(note.trim(40)).to.equal(-6);
});
});
describe("when alert text is shorter than the length that needs to be removed", function() {
it("returns the number of bytes too long", function() {
note.payload.largePayload = "this is a very long payload";
note.alert = "alert";
expect(note.trim(40)).to.equal(-25);
});
});
});
describe("unicode text", function() {