Skip to content

Commit

Permalink
src/notifications: Add CACHE_MANAGER as provider in tests
Browse files Browse the repository at this point in the history
Fixes API tests
  • Loading branch information
sashko9807 committed Dec 7, 2023
1 parent 3b4c891 commit 540d31f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/api/src/notifications/notifications.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from '@prisma/client'
import { SendGridParams } from './providers/notifications.sendgrid.types'
import { KeycloakTokenParsed } from '../auth/keycloak'
import { CACHE_MANAGER } from '@nestjs/cache-manager'

const RegisteredMock = {
id: 'some-id',
Expand Down Expand Up @@ -90,6 +91,7 @@ describe('MarketingNotificationsController', () => {
}),
},
},
{ provide: CACHE_MANAGER, useFactory: jest.fn() },
],
})
.overrideProvider(EmailService)
Expand Down

0 comments on commit 540d31f

Please sign in to comment.