forked from fahrPool/fahrPool
11 lines
505 B
TypeScript
11 lines
505 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { pruefeSuperadmin } from "./superadmin";
|
|
|
|
describe("pruefeSuperadmin", () => {
|
|
it("nur Rolle superadmin", () => {
|
|
expect(pruefeSuperadmin({ status: "ok", profile: { id: "1", name: "S", role: "superadmin", firma_id: null } })).toBe(true);
|
|
expect(pruefeSuperadmin({ status: "ok", profile: { id: "1", name: "A", role: "admin", firma_id: "f" } })).toBe(false);
|
|
expect(pruefeSuperadmin({ status: "unauthenticated" })).toBe(false);
|
|
});
|
|
});
|