test authorization module
This commit is contained in:
parent
50742fc53a
commit
f67a0ef870
|
@ -3,6 +3,7 @@ import { AutomapperModule } from '@automapper/nestjs';
|
|||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { ValidateAuthorizationRequest } from '../../domain/dtos/validate-authorization.request';
|
||||
import { ValidateAuthorizationUseCase } from '../../domain/usecases/validate-authorization.usecase';
|
||||
import { ValidateAuthorizationQuery } from '../../queries/validate-authorization.query';
|
||||
|
||||
describe('ValidateAuthorizationUseCase', () => {
|
||||
let validateAuthorizationUseCase: ValidateAuthorizationUseCase;
|
||||
|
@ -31,7 +32,12 @@ describe('ValidateAuthorizationUseCase', () => {
|
|||
validateAuthorizationRequest.action = 'authorized';
|
||||
|
||||
expect(
|
||||
validateAuthorizationUseCase.execute(validateAuthorizationRequest),
|
||||
validateAuthorizationUseCase.execute(
|
||||
new ValidateAuthorizationQuery(
|
||||
validateAuthorizationRequest.uuid,
|
||||
validateAuthorizationRequest.action,
|
||||
),
|
||||
),
|
||||
).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue