repositories integration tests
This commit is contained in:
		
							parent
							
								
									0ccaafc5e0
								
							
						
					
					
						commit
						c3f31c4d2a
					
				|  | @ -74,7 +74,7 @@ describe('UsernameRepository', () => { | ||||||
|     }); |     }); | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|   describe('findOne', () => { |   describe('findByName', () => { | ||||||
|     it('should return a Username', async () => { |     it('should return a Username', async () => { | ||||||
|       await prismaService.username.create({ |       await prismaService.username.create({ | ||||||
|         data: { |         data: { | ||||||
|  | @ -84,9 +84,9 @@ describe('UsernameRepository', () => { | ||||||
|         }, |         }, | ||||||
|       }); |       }); | ||||||
| 
 | 
 | ||||||
|       const username = await usernameRepository.findOne({ |       const username = await usernameRepository.findByName( | ||||||
|         username: 'john.doe@email.com', |         'john.doe@email.com', | ||||||
|       }); |       ); | ||||||
|       expect(username.id).toBe('john.doe@email.com'); |       expect(username.id).toBe('john.doe@email.com'); | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|  | @ -184,7 +184,7 @@ describe('UsernameRepository', () => { | ||||||
|       const toDelete: UsernameEntity = await UsernameEntity.create( |       const toDelete: UsernameEntity = await UsernameEntity.create( | ||||||
|         createUsernameProps, |         createUsernameProps, | ||||||
|       ); |       ); | ||||||
|       await usernameRepository.delete(toDelete); |       await usernameRepository.deleteUsername(toDelete); | ||||||
| 
 | 
 | ||||||
|       const count = await prismaService.username.count(); |       const count = await prismaService.username.count(); | ||||||
|       expect(count).toBe(0); |       expect(count).toBe(0); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue