summaryrefslogtreecommitdiffstats
path: root/test/networking/NetworkUtil.test.js
diff options
context:
space:
mode:
authorZlatko Murgoski <zlatko.murgoski@nokia.com>2018-09-20 12:03:01 +0200
committerZlatko Murgoski <zlatko.murgoski@nokia.com>2018-10-10 14:57:21 +0200
commit2f2462bec0ff957737e10467a78053e9fac8fbd6 (patch)
tree409e254f698e39f3e5333463670554e7601ef0fd /test/networking/NetworkUtil.test.js
parent21ab8d88d55d264eff83d628ba924e95cff52fc4 (diff)
Increase code coverage
Change-Id: I808d0d235bbdb250ac8a89256fd229257717c2a2 Issue-ID: AAI-1659 Signed-off-by: Zlatko Murgoski <zlatko.murgoski@nokia.com>
Diffstat (limited to 'test/networking/NetworkUtil.test.js')
-rw-r--r--test/networking/NetworkUtil.test.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/networking/NetworkUtil.test.js b/test/networking/NetworkUtil.test.js
new file mode 100644
index 0000000..1743813
--- /dev/null
+++ b/test/networking/NetworkUtil.test.js
@@ -0,0 +1,22 @@
+import {getTSUIElasticSearchQueryString} from 'app/networking/NetworkUtil';
+
+describe("Network Utils", () => {
+ describe('#getTSUIElasticSearchQueryString', () => {
+ it('should return query body', () => {
+ const query = "query";
+ const response = getTSUIElasticSearchQueryString(query);
+ expect(response).toEqual({"maxResults": "10", "queryStr": "query"});
+ });
+
+ it('should return partial request query', () => {
+ const query = "";
+ const response = getTSUIElasticSearchQueryString(query);
+ expect(response).toEqual({"maxResults": "10", "queryStr": ""});
+ });
+
+ it('should be truthy', () => {
+ const query = "";
+ expect(getTSUIElasticSearchQueryString(query)).toBeTruthy();
+ })
+ });
+});