Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,19 @@
|
||||
// @vitest-environment node
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import path from "node:path";
|
||||
|
||||
const source = readFileSync(path.join(path.dirname(fileURLToPath(import.meta.url)), "EntityViewsApi.ts"), "utf8");
|
||||
|
||||
describe("EntityViewsApi tenant scope", () => {
|
||||
test("validates entity views against the current tenant/user scope", () => {
|
||||
expect(source).toContain("validateEntityView({ entityId: entity.id, isDefault, name, title, order: null, tenantId, userId })");
|
||||
expect(source).toContain("tenantId: item.tenantId, userId: item.userId");
|
||||
expect(source).toContain("const views = await getEntityViews(entityId, { tenantId, userId })");
|
||||
});
|
||||
|
||||
test("loads entity views by id through the current entity and tenant scope", () => {
|
||||
expect(source).toContain("getEntityView(id, { entityId: entity.id, tenantId })");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user