Added a cron job processor so emails and notifications can get processed. Added super admin settings with a gui to edit.
This commit is contained in:
17 files changed
+645
-48
No files matched your search
@@ -49,3 +49,30 @@ describe("generateBusinessEnv — AUTH_URL", () => {
|
||||
expect(env).toContain('NEXT_PUBLIC_APP_URL="https://other-business.example.com"');
|
||||
});
|
||||
});
|
||||
|
||||
describe("generateBusinessEnv — SUPER_ADMIN_*", () => {
|
||||
it("leaves SUPER_ADMIN_EMAIL blank when no global default is configured", () => {
|
||||
const env = generateBusinessEnv(baseValues);
|
||||
expect(env).toContain('SUPER_ADMIN_EMAIL=""');
|
||||
expect(env).toContain('SUPER_ADMIN_FIRST_NAME=""');
|
||||
expect(env).toContain('SUPER_ADMIN_LAST_NAME=""');
|
||||
});
|
||||
|
||||
it("bakes in the global default Super Administrator when given one", () => {
|
||||
const env = generateBusinessEnv({
|
||||
...baseValues,
|
||||
superAdmin: { email: "lazis002@gmail.com", firstName: "Stefan", lastName: "Lazic" },
|
||||
});
|
||||
expect(env).toContain('SUPER_ADMIN_EMAIL="lazis002@gmail.com"');
|
||||
expect(env).toContain('SUPER_ADMIN_FIRST_NAME="Stefan"');
|
||||
expect(env).toContain('SUPER_ADMIN_LAST_NAME="Lazic"');
|
||||
});
|
||||
|
||||
it("never writes a SUPER_ADMIN_PASSWORD line — sign-in is OTP-only", () => {
|
||||
const env = generateBusinessEnv({
|
||||
...baseValues,
|
||||
superAdmin: { email: "lazis002@gmail.com", firstName: "Stefan", lastName: "Lazic" },
|
||||
});
|
||||
expect(env).not.toContain("SUPER_ADMIN_PASSWORD");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user