fixed UserExistsError message to say email instead of username

This commit is contained in:
TomDo1234
2023-05-24 07:12:58 +10:00
parent fe7ddf3e0f
commit b47e84369c
2 changed files with 4 additions and 1 deletions

View File

@@ -458,7 +458,7 @@ describe('collections-graphql', () => {
expect(error.response.errors[1].message).toEqual('The following field is invalid: email');
expect(error.response.errors[1].path[0]).toEqual('test3');
expect(error.response.errors[1].extensions.name).toEqual('ValidationError');
expect(error.response.errors[1].extensions.data[0].message).toEqual('A user with the given username is already registered');
expect(error.response.errors[1].extensions.data[0].message).toEqual('A user with the given email is already registered');
expect(error.response.errors[1].extensions.data[0].field).toEqual('email');
});
});