From a5d6ff3110c637b3f70205c1690ae1ef73cd3d5e Mon Sep 17 00:00:00 2001 From: Philipp Czora Date: Thu, 2 Aug 2018 08:44:13 +0200 Subject: [PATCH] Added unit test --- scm-ui/src/groups/modules/groups.test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scm-ui/src/groups/modules/groups.test.js b/scm-ui/src/groups/modules/groups.test.js index 664f4d1969..e8b1c1da38 100644 --- a/scm-ui/src/groups/modules/groups.test.js +++ b/scm-ui/src/groups/modules/groups.test.js @@ -435,9 +435,14 @@ describe("selector tests", () => { } } }; + expect(getGroupsFromState(state)).toEqual([{ name: "a" }, { name: "b" }]); }); + it("should return null when there are no groups in the state", () => { + expect(getGroupsFromState({})).toBe(null) + }); + it("should return true, when fetch groups is pending", () => { const state = { pending: {