11 lines
363 B
TypeScript
11 lines
363 B
TypeScript
import { buildAttachment } from "@server/test/factories";
|
|
import Attachment from "./Attachment";
|
|
|
|
describe("#findByKey", () => {
|
|
it("should return the correct attachment given a key", async () => {
|
|
const attachment = await buildAttachment();
|
|
const found = await Attachment.findByKey(attachment.key);
|
|
expect(found?.id).toBe(attachment.id);
|
|
});
|
|
});
|