From f1ec67cf0f1a799a9b8f4cbd6186d8f7804212cc Mon Sep 17 00:00:00 2001 From: Andrew Naylor Date: Fri, 20 Mar 2015 09:10:35 +0000 Subject: [PATCH] Last piece of functionality to test --- test/notification.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/notification.js b/test/notification.js index c6f59e8..351da89 100644 --- a/test/notification.js +++ b/test/notification.js @@ -151,6 +151,14 @@ describe("Notification", function() { note.trim(note.length() - 8); expect(note.alert).to.equal("this is a test"); }); + + it("leaves alert intact when there are no other spaces in the string", function() { + note.alert = "this_is_a_test_payload"; + note.truncateAtWordEnd = true; + + note.trim(note.length() - 8); + expect(note.alert).to.equal("this_is_a_test"); + }); }); describe("alert contains escape sequences at trim point", function() {