mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
feat: Allow setting API keys expiration (#12954)
This commit is contained in:
@@ -79,7 +79,9 @@ describe('ApiKeysController', () => {
|
||||
updatedAt: new Date(),
|
||||
} as ApiKey;
|
||||
|
||||
publicApiKeyService.getRedactedApiKeysForUser.mockResolvedValue([apiKeyData]);
|
||||
publicApiKeyService.getRedactedApiKeysForUser.mockResolvedValue([
|
||||
{ ...apiKeyData, expiresAt: null },
|
||||
]);
|
||||
|
||||
// Act
|
||||
|
||||
@@ -87,7 +89,7 @@ describe('ApiKeysController', () => {
|
||||
|
||||
// Assert
|
||||
|
||||
expect(apiKeys).toEqual([apiKeyData]);
|
||||
expect(apiKeys).toEqual([{ ...apiKeyData, expiresAt: null }]);
|
||||
expect(publicApiKeyService.getRedactedApiKeysForUser).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ id: req.user.id }),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user