From 0884da553ad9f12be05f45777af907d197e80299 Mon Sep 17 00:00:00 2001 From: Andrew Naylor Date: Tue, 10 Mar 2015 18:35:54 +0000 Subject: [PATCH] toJSON will be refactored. --- test/notification.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/notification.js b/test/notification.js index 3a5eead..5fda6e9 100644 --- a/test/notification.js +++ b/test/notification.js @@ -258,4 +258,17 @@ describe("Notification", function() { }); }); }); + + describe("toJSON", function() { + it("returns an Object", function() { + expect(note.toJSON()).to.be.an('object'); + }); + + describe("aps payload", function() { + it("includes alert text", function() { + note.alert = "Test Message"; + expect(note.toJSON().aps.alert).to.equal("Test Message"); + }); + }); + }); });