From 8ebc0de495c0edc21d303ef3d3d1832e57a3dba3 Mon Sep 17 00:00:00 2001 From: Lorenz Baum Date: Thu, 1 Feb 2018 19:04:36 +0100 Subject: [PATCH 1/2] Removed message from required export keys #18 --- lib/MessageSink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MessageSink.js b/lib/MessageSink.js index eb6e18a..f93273e 100755 --- a/lib/MessageSink.js +++ b/lib/MessageSink.js @@ -30,7 +30,7 @@ const errors = require('./MessageSink/errors.js'); const MSG_CREATE_EXPORT_KEYS = ['api_key', 'user_id', 'type', 'time_stamp', 'platform', 'message', 'intent', 'version', 'response_time', 'custom_session_id']; const REQUIRED_MSG_CREATE_EXPORT_KEYS = ['api_key', 'type', 'user_id', - 'time_stamp', 'platform', 'message']; + 'time_stamp', 'platform']; const MSG_UPDATE_EXPORT_KEYS = ['api_key', 'message_id', 'intent', 'feedback', 'version']; const REQUIRED_MSG_UPDATE_EXPORT_KEYS = ['api_key', 'message_id']; From 19a4cad86f47d190ae6d1797f087b696c1086ccc Mon Sep 17 00:00:00 2001 From: Lorenz Baum Date: Sat, 3 Feb 2018 18:21:50 +0100 Subject: [PATCH 2/2] Removed message from required keys. Tests fixed --- tests/unit/MessageSink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/MessageSink.js b/tests/unit/MessageSink.js index b17a4c8..ccb78d1 100644 --- a/tests/unit/MessageSink.js +++ b/tests/unit/MessageSink.js @@ -142,7 +142,7 @@ test('validateCreateManifest should return false on a new instance', t => { test('validateCreateManifest should return true when all required string are set', t => { inst.api_key = STUB; inst.user_id = STUB; - t.is(inst.setPlatform(STUB).setMessage(STUB).validateCreateManifest(), true); + t.is(inst.setPlatform(STUB).validateCreateManifest(), true); }); test('validateUpdateManifest should return false on an instance with api_key and message_id set', t => {