Files
twenty/server/src/core/comment/resolvers/comment-thread.resolver.spec.ts
Jérémy M 51cfc0d82c feat: refactoring casl permission checks for recursive nested operations (#778)
* feat: nested casl abilities

* fix: remove unused packages

* Fixes

* Fix createMany broken

* Fix lint

* Fix lint

* Fix lint

* Fix lint

* Fixes

* Fix CommentThread

* Fix bugs

* Fix lint

* Fix bugs

* Fixed auto routing

* Fixed app path

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2023-07-25 16:37:22 -07:00

33 lines
856 B
TypeScript

import { Test, TestingModule } from '@nestjs/testing';
import { CommentThreadService } from 'src/core/comment/services/comment-thread.service';
import { AbilityFactory } from 'src/ability/ability.factory';
import { CommentThreadResolver } from './comment-thread.resolver';
describe('CommentThreadResolver', () => {
let resolver: CommentThreadResolver;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [
CommentThreadResolver,
{
provide: CommentThreadService,
useValue: {},
},
{
provide: AbilityFactory,
useValue: {},
},
],
}).compile();
resolver = module.get<CommentThreadResolver>(CommentThreadResolver);
});
it('should be defined', () => {
expect(resolver).toBeDefined();
});
});