Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

697 B
Raw Blame
import { describe, expect, it } from "vite-plus/test";

import { isDeleteConfirmationValid } from "./is-delete-confirmation-valid";

describe("isDeleteConfirmationValid", () => {
  it("accepts the email ignoring case and surrounding spaces", () => {
    expect(
      isDeleteConfirmationValid("  [email protected] ", "[email protected]"),
    ).toBe(true);
  });

  it("rejects a different email", () => {
    expect(
      isDeleteConfirmationValid("[email protected]", "[email protected]"),
    ).toBe(false);
  });

  it("rejects when the email is unknown", () => {
    expect(isDeleteConfirmationValid("", undefined)).toBe(false);
    expect(isDeleteConfirmationValid("", "")).toBe(false);
  });
});