@@ -2,7 +2,7 @@ import { expect } from "chai";
22import cleanDb from "../../utils/cleanDb" ;
33import * as impersonationModel from "../../../models/impersonationRequests" ;
44import { impersonationRequestsBodyData } from "../../fixtures/impersonation-requests/impersonationRequests" ;
5- import { REQUEST_STATE , ERROR_WHILE_CREATING_REQUEST , ERROR_WHILE_UPDATING_REQUEST } from "../../../constants/requests" ;
5+ import { REQUEST_STATE , ERROR_WHILE_CREATING_REQUEST , ERROR_WHILE_UPDATING_REQUEST , OPERATION_NOT_ALLOWED } from "../../../constants/requests" ;
66import addUser from "../../utils/addUser" ;
77import userDataFixture from "../../fixtures/user/user" ;
88import sinon from "sinon" ;
@@ -47,7 +47,7 @@ describe("models/impersonationRequests", () => {
4747 try {
4848 await impersonationModel . createImpersonationRequest ( mockRequestBody ) ;
4949 } catch ( error ) {
50- expect ( error . message ) . to . include ( "You are not allowed for this Operation at the moment" ) ;
50+ expect ( error . message ) . to . include ( OPERATION_NOT_ALLOWED ) ;
5151 }
5252 } ) ;
5353
@@ -78,7 +78,7 @@ describe("models/impersonationRequests", () => {
7878 await impersonationModel . createImpersonationRequest ( { ...impersonationRequestsBodyData [ 0 ] , status : REQUEST_STATE . APPROVED } ) ;
7979 await impersonationModel . createImpersonationRequest ( impersonationRequestsBodyData [ 0 ] ) ;
8080 } catch ( error ) {
81- expect ( error . message ) . to . include ( "You are not allowed for this Operation at the moment" ) ;
81+ expect ( error . message ) . to . include ( OPERATION_NOT_ALLOWED ) ;
8282 }
8383 } ) ;
8484 } ) ;
0 commit comments