feat(gatekeeper): add PR merge automation service
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Some checks failed
ci/woodpecker/push/ci Pipeline failed
This commit is contained in:
@@ -211,9 +211,7 @@ describe("AuthGuard", () => {
|
||||
});
|
||||
|
||||
await expect(guard.canActivate(context)).rejects.toThrow(UnauthorizedException);
|
||||
await expect(guard.canActivate(context)).rejects.toThrow(
|
||||
"Invalid user data in session"
|
||||
);
|
||||
await expect(guard.canActivate(context)).rejects.toThrow("Invalid user data in session");
|
||||
});
|
||||
|
||||
it("should throw UnauthorizedException when user is missing email", async () => {
|
||||
@@ -227,9 +225,7 @@ describe("AuthGuard", () => {
|
||||
});
|
||||
|
||||
await expect(guard.canActivate(context)).rejects.toThrow(UnauthorizedException);
|
||||
await expect(guard.canActivate(context)).rejects.toThrow(
|
||||
"Invalid user data in session"
|
||||
);
|
||||
await expect(guard.canActivate(context)).rejects.toThrow("Invalid user data in session");
|
||||
});
|
||||
|
||||
it("should throw UnauthorizedException when user is missing name", async () => {
|
||||
@@ -243,9 +239,7 @@ describe("AuthGuard", () => {
|
||||
});
|
||||
|
||||
await expect(guard.canActivate(context)).rejects.toThrow(UnauthorizedException);
|
||||
await expect(guard.canActivate(context)).rejects.toThrow(
|
||||
"Invalid user data in session"
|
||||
);
|
||||
await expect(guard.canActivate(context)).rejects.toThrow("Invalid user data in session");
|
||||
});
|
||||
|
||||
it("should throw UnauthorizedException when user is a string", async () => {
|
||||
@@ -259,9 +253,7 @@ describe("AuthGuard", () => {
|
||||
});
|
||||
|
||||
await expect(guard.canActivate(context)).rejects.toThrow(UnauthorizedException);
|
||||
await expect(guard.canActivate(context)).rejects.toThrow(
|
||||
"Invalid user data in session"
|
||||
);
|
||||
await expect(guard.canActivate(context)).rejects.toThrow("Invalid user data in session");
|
||||
});
|
||||
|
||||
it("should reject when user is null (typeof null === 'object' causes TypeError on 'in' operator)", async () => {
|
||||
@@ -277,9 +269,7 @@ describe("AuthGuard", () => {
|
||||
});
|
||||
|
||||
await expect(guard.canActivate(context)).rejects.toThrow(TypeError);
|
||||
await expect(guard.canActivate(context)).rejects.not.toBeInstanceOf(
|
||||
UnauthorizedException
|
||||
);
|
||||
await expect(guard.canActivate(context)).rejects.not.toBeInstanceOf(UnauthorizedException);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user