Skip to content

Commit

Permalink
fix: fixed auth tests (#904)
Browse files Browse the repository at this point in the history
  • Loading branch information
chesterkmr authored Aug 20, 2023
1 parent c6c025a commit ea5ed9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const userService = {
}
return null;
},
getByEmailUnscoped(email: any) {
return this.getByEmail(email);
},
};

const passwordService = {
Expand All @@ -50,7 +53,7 @@ const tokenService = {
describe('AuthService', () => {
//ARRANGE
let service: AuthService;
beforeEach(async () => {
beforeAll(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [
{
Expand Down
8 changes: 5 additions & 3 deletions services/workflows-service/src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ export class UserService {
userToProjects: !args?.data?.userToProjects
? {
createMany: {
data: projectIds!.map(projectId => {
return { projectId };
}),
data: projectIds
? projectIds!.map(projectId => {
return { projectId };
})
: [],
},
}
: args.data.userToProjects,
Expand Down

0 comments on commit ea5ed9f

Please sign in to comment.