[Notification] Fix TCT update - not posted notification
authorPawel Kaczmarek <p.kaczmarek3@samsung.com>
Tue, 24 Mar 2015 08:16:02 +0000 (09:16 +0100)
committerPawel Kaczmarek <p.kaczmarek3@samsung.com>
Tue, 24 Mar 2015 08:16:02 +0000 (09:16 +0100)
[Verification]
TCT NotificationManager_update_notposted - should pass

Change-Id: I4c7bf53fdce8077939d0330a062b9a0bf1d93dd8
Signed-off-by: Pawel Kaczmarek <p.kaczmarek3@samsung.com>
src/notification/notification_api.js

index 3e3b53cda4f0fd29ce4c1bac8199ca61cd8fcbc7..afdac6d95a4b77b172b8ee06e327b074e6ca0b75 100644 (file)
@@ -73,6 +73,9 @@ NotificationManager.prototype.update = function(notification) {
   if (!arguments.length) {
     throw new WebAPIException(WebAPIException.NOT_FOUND_ERR);
   }
+  if (!args.notification.id) {
+    throw new WebAPIException(WebAPIException.UNKNOWN_ERR);
+  }
 
   var data = {
     notification: args.notification