From 79311a5947c372a43daffa5eb68db7d3fd5d66e0 Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Thu, 9 May 2019 17:12:08 +0200 Subject: [PATCH] fixed tests --- scm-ui/src/config/modules/roles.test.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scm-ui/src/config/modules/roles.test.js b/scm-ui/src/config/modules/roles.test.js index e9a12bc30a..fc165f863a 100644 --- a/scm-ui/src/config/modules/roles.test.js +++ b/scm-ui/src/config/modules/roles.test.js @@ -320,7 +320,7 @@ describe("repository roles reducer", () => { describe("repository roles selector", () => { it("should return an empty object", () => { expect(selectListAsCollection({})).toEqual({}); - expect(selectListAsCollection({ repositoryRoles: { a: "a" } })).toEqual({}); + expect(selectListAsCollection({ roles: { a: "a" } })).toEqual({}); }); it("should return a state slice collection", () => { @@ -330,7 +330,7 @@ describe("repository roles selector", () => { }; const state = { - repositoryRoles: { + roles: { list: { entry: collection } @@ -342,18 +342,18 @@ describe("repository roles selector", () => { it("should return false", () => { expect(isPermittedToCreateRoles({})).toBe(false); expect( - isPermittedToCreateRoles({ repositoryRoles: { list: { entry: {} } } }) + isPermittedToCreateRoles({ roles: { list: { entry: {} } } }) ).toBe(false); expect( isPermittedToCreateRoles({ - repositoryRoles: { list: { entry: { roleCreatePermission: false } } } + roles: { list: { entry: { roleCreatePermission: false } } } }) ).toBe(false); }); it("should return true", () => { const state = { - repositoryRoles: { + roles: { list: { entry: { roleCreatePermission: true @@ -366,7 +366,7 @@ describe("repository roles selector", () => { it("should get repositoryRoles from state", () => { const state = { - repositoryRoles: { + roles: { list: { entries: ["a", "b"] }, @@ -438,7 +438,7 @@ describe("repository roles selector", () => { it("should return role1", () => { const state = { - repositoryRoles: { + roles: { byNames: { role1: role1 }