Skip to content

Commit a9304d3

Browse files
pujitmelibosley
authored andcommitted
fix(api): update api key service test for ensureDir change
1 parent bae5880 commit a9304d3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

api/src/unraid-api/auth/api-key.service.spec.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ describe('ApiKeyService', () => {
9191
vi.mocked(ensureDir).mockResolvedValue();
9292

9393
apiKeyService = new ApiKeyService();
94-
await apiKeyService.initialize();
9594

9695
vi.spyOn(apiKeyService as any, 'generateApiKey').mockReturnValue('test-api-key');
9796
vi.mock('uuid', () => ({
@@ -113,12 +112,8 @@ describe('ApiKeyService', () => {
113112

114113
describe('initialization', () => {
115114
it('should ensure directory exists', async () => {
116-
vi.mocked(ensureDir).mockResolvedValue();
117115
const service = new ApiKeyService();
118-
119-
await service.initialize();
120-
121-
expect(ensureDir).toHaveBeenCalledWith(mockBasePath);
116+
expect(ensureDirSync).toHaveBeenCalledWith(mockBasePath);
122117
});
123118

124119
it('should return correct paths', async () => {

0 commit comments

Comments
 (0)