mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
add selector for createPermission and show create dummy in uiC
This commit is contained in:
@@ -438,7 +438,7 @@ describe("permissions selectors", () => {
|
||||
it("should return true, when createPermission is true", () => {
|
||||
const state = {
|
||||
permissions: {
|
||||
["/hitchhiker/puzzle42"]: {
|
||||
["hitchhiker/puzzle42"]: {
|
||||
createPermission: true
|
||||
}
|
||||
}
|
||||
@@ -447,6 +447,13 @@ describe("permissions selectors", () => {
|
||||
});
|
||||
|
||||
it("should return false, when createPermission is false", () => {
|
||||
expect(hasCreatePermission({}, "hitchiker", "puzzle42")).toEqual(false);
|
||||
const state = {
|
||||
permissions: {
|
||||
["hitchhiker/puzzle42"]: {
|
||||
createPermission: false
|
||||
}
|
||||
}
|
||||
};
|
||||
expect(hasCreatePermission(state, "hitchhiker", "puzzle42")).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user