You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/05/04 00:15:43 UTC
[incubator-openwhisk-package-pushnotifications] branch master
updated: updated the unit tests (#77)
This is an automated email from the ASF dual-hosted git repository.
csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-package-pushnotifications.git
The following commit(s) were added to refs/heads/master by this push:
new ef8384d updated the unit tests (#77)
ef8384d is described below
commit ef8384d88d822e160d08cb7447e31cf58694cd36
Author: Anantha Krishnan K G <An...@users.noreply.github.com>
AuthorDate: Thu May 4 05:45:41 2017 +0530
updated the unit tests (#77)
---
.../src/test/scala/packages/PushNotificationsTests.scala | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tests/src/test/scala/packages/PushNotificationsTests.scala b/tests/src/test/scala/packages/PushNotificationsTests.scala
index 55d4a07..3ce0549 100644
--- a/tests/src/test/scala/packages/PushNotificationsTests.scala
+++ b/tests/src/test/scala/packages/PushNotificationsTests.scala
@@ -34,6 +34,8 @@ class PushNotificationsTests
val url = "www.google.com".toJson;
val messageText = "This is pushnotifications Testing".toJson;
+ val unicodeMessage = "\ue04a".toJson;
+ val accentMessage = "Máxima de 33 C and Mínima de 26 C".toJson;
behavior of "Push Package"
@@ -44,6 +46,20 @@ class PushNotificationsTests
}
}
+ it should "Send Notification action with unicode message" in {
+ val name = "/whisk.system/pushnotifications/sendMessage"
+ withActivation(wsk.activation,wsk.action.invoke(name, Map("appSecret" -> appSecret, "appGuid" -> appGuid, "text" -> unicodeMessage))){
+ _.response.result.get.toString should include ("message")
+ }
+ }
+
+ it should "Send Notification action with accent message" in {
+ val name = "/whisk.system/pushnotifications/sendMessage"
+ withActivation(wsk.activation,wsk.action.invoke(name, Map("appSecret" -> appSecret, "appGuid" -> appGuid, "text" -> accentMessage))){
+ _.response.result.get.toString should include ("message")
+ }
+ }
+
it should "Send Notification action with url" in {
val name = "/whisk.system/pushnotifications/sendMessage"
withActivation(wsk.activation,wsk.action.invoke(name, Map("appSecret" -> appSecret, "appGuid" -> appGuid, "text" -> messageText, "url"-> url))){
--
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].