mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 09:00:57 +00:00
fix: an issue
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { documentSettingCode } from "./documentSettingCode";
|
||||
|
||||
describe("documentSettingCode", () => {
|
||||
it("resolves the nationality set", () => {
|
||||
expect(documentSettingCode("ethiopian")).toBe(
|
||||
"company_onboarding_documents_ethiopian",
|
||||
);
|
||||
expect(documentSettingCode("foreign")).toBe(
|
||||
"company_onboarding_documents_foreign",
|
||||
);
|
||||
expect(documentSettingCode(null)).toBe(
|
||||
"company_onboarding_documents_ethiopian",
|
||||
);
|
||||
});
|
||||
|
||||
it("replaces the nationality set for a co-operative", () => {
|
||||
expect(documentSettingCode("ethiopian", true)).toBe(
|
||||
"company_onboarding_documents_cooperative",
|
||||
);
|
||||
// A co-op is never foreign, but a stale flag must not fall back to the
|
||||
// foreign set — the co-op answer wins.
|
||||
expect(documentSettingCode("foreign", true)).toBe(
|
||||
"company_onboarding_documents_cooperative",
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user