Skip to content

Commit 393822d

Browse files
committed
fix: update user role assertion in Sign Up test to match expected structure
1 parent 079bf60 commit 393822d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/app.e2e-spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as request from 'supertest';
55

66
import { AppModule } from 'src/app.module';
77
import { SignInInput, SignUpInput } from 'src/auth/inputs/auth.input';
8+
import { UserRole } from 'src/user/entities/user.entity';
89

910
const TEST = 'test';
1011
const userInfo = {
@@ -45,7 +46,7 @@ describe('Container Test (e2e)', () => {
4546
mutation ($input: ${SignUpInput.prototype.constructor.name}!) {
4647
${keyName}(input: $input) {
4748
user{
48-
${Object.keys(userInfo).join('\n')}
49+
role
4950
}
5051
}
5152
}
@@ -64,7 +65,7 @@ describe('Container Test (e2e)', () => {
6465
.set('Content-Type', 'application/json')
6566
.expect(HttpStatus.OK)
6667
.expect(({ body: { data } }) => {
67-
expect(data[keyName]).toMatchObject({ user: userInfo });
68+
expect(data[keyName]).toMatchObject({ user: { role: UserRole.USER } });
6869
});
6970
});
7071

0 commit comments

Comments
 (0)