@@ -21,7 +21,7 @@ describe('Login basic route', () => {
2121 createTokensSpy . mockClear ( ) ;
2222 } ) ;
2323
24- it ( 'Should throw error when empty body is sent' , async ( ) => {
24+ it ( 'Should send error when empty body is sent' , async ( ) => {
2525 const response = await addHeaders ( request . post ( endpoint ) ) ;
2626 expect ( response . status ) . toBe ( 400 ) ;
2727 expect ( mockUserFindByEmail ) . not . toBeCalled ( ) ;
@@ -30,7 +30,7 @@ describe('Login basic route', () => {
3030 expect ( createTokensSpy ) . not . toBeCalled ( ) ;
3131 } ) ;
3232
33- it ( 'Should throw error when email is only sent' , async ( ) => {
33+ it ( 'Should send error when email is only sent' , async ( ) => {
3434 const response = await addHeaders ( request . post ( endpoint )
3535 . send ( { email : USER_EMAIL } )
3636 ) ;
@@ -42,7 +42,7 @@ describe('Login basic route', () => {
4242 expect ( createTokensSpy ) . not . toBeCalled ( ) ;
4343 } ) ;
4444
45- it ( 'Should throw error when password is only sent' , async ( ) => {
45+ it ( 'Should send error when password is only sent' , async ( ) => {
4646 const response = await addHeaders ( request . post ( endpoint )
4747 . send ( { password : USER_PASSWORD } )
4848 ) ;
@@ -54,7 +54,7 @@ describe('Login basic route', () => {
5454 expect ( createTokensSpy ) . not . toBeCalled ( ) ;
5555 } ) ;
5656
57- it ( 'Should throw error when email is not valid format' , async ( ) => {
57+ it ( 'Should send error when email is not valid format' , async ( ) => {
5858 const response = await addHeaders ( request . post ( endpoint )
5959 . send ( { email : '123' } )
6060 ) ;
@@ -66,7 +66,7 @@ describe('Login basic route', () => {
6666 expect ( createTokensSpy ) . not . toBeCalled ( ) ;
6767 } ) ;
6868
69- it ( 'Should throw error when password is not valid format' , async ( ) => {
69+ it ( 'Should send error when password is not valid format' , async ( ) => {
7070 const response = await addHeaders ( request . post ( endpoint )
7171 . send ( {
7272 email : '123@abc.com' ,
@@ -81,7 +81,7 @@ describe('Login basic route', () => {
8181 expect ( createTokensSpy ) . not . toBeCalled ( ) ;
8282 } ) ;
8383
84- it ( 'Should throw error when user not registered for email' , async ( ) => {
84+ it ( 'Should send error when user not registered for email' , async ( ) => {
8585 const response = await addHeaders ( request . post ( endpoint )
8686 . send ( {
8787 email : '123@abc.com' ,
@@ -95,7 +95,7 @@ describe('Login basic route', () => {
9595 expect ( createTokensSpy ) . not . toBeCalled ( ) ;
9696 } ) ;
9797
98- it ( 'Should throw error for wrong password' , async ( ) => {
98+ it ( 'Should send error for wrong password' , async ( ) => {
9999 const response = await addHeaders ( request . post ( endpoint )
100100 . send ( {
101101 email : USER_EMAIL ,
0 commit comments