Update tests to handle domain verification
This commit is contained in:
@@ -86,6 +86,13 @@ export interface WorkflowStepFactoryOptions {
|
||||
templateId?: string | null;
|
||||
}
|
||||
|
||||
export interface DomainFactoryOptions {
|
||||
projectId: string;
|
||||
domain?: string;
|
||||
verified?: boolean;
|
||||
dkimTokens?: unknown;
|
||||
}
|
||||
|
||||
export class TestFactories {
|
||||
private prisma: PrismaClient;
|
||||
|
||||
@@ -545,6 +552,20 @@ export class TestFactories {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a domain
|
||||
*/
|
||||
async createDomain(options: DomainFactoryOptions) {
|
||||
return this.prisma.domain.create({
|
||||
data: {
|
||||
projectId: options.projectId,
|
||||
domain: options.domain || 'example.com',
|
||||
verified: options.verified ?? true,
|
||||
dkimTokens: options.dkimTokens || null,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Export lazy-initialized singleton instance
|
||||
|
||||
Reference in New Issue
Block a user