@@ -21,7 +21,7 @@ describe('Login basic route', () => {
21
21
createTokensSpy . mockClear ( ) ;
22
22
} ) ;
23
23
24
- it ( 'Should throw error when empty body is sent' , async ( ) => {
24
+ it ( 'Should send error when empty body is sent' , async ( ) => {
25
25
const response = await addHeaders ( request . post ( endpoint ) ) ;
26
26
expect ( response . status ) . toBe ( 400 ) ;
27
27
expect ( mockUserFindByEmail ) . not . toBeCalled ( ) ;
@@ -30,7 +30,7 @@ describe('Login basic route', () => {
30
30
expect ( createTokensSpy ) . not . toBeCalled ( ) ;
31
31
} ) ;
32
32
33
- it ( 'Should throw error when email is only sent' , async ( ) => {
33
+ it ( 'Should send error when email is only sent' , async ( ) => {
34
34
const response = await addHeaders ( request . post ( endpoint )
35
35
. send ( { email : USER_EMAIL } )
36
36
) ;
@@ -42,7 +42,7 @@ describe('Login basic route', () => {
42
42
expect ( createTokensSpy ) . not . toBeCalled ( ) ;
43
43
} ) ;
44
44
45
- it ( 'Should throw error when password is only sent' , async ( ) => {
45
+ it ( 'Should send error when password is only sent' , async ( ) => {
46
46
const response = await addHeaders ( request . post ( endpoint )
47
47
. send ( { password : USER_PASSWORD } )
48
48
) ;
@@ -54,7 +54,7 @@ describe('Login basic route', () => {
54
54
expect ( createTokensSpy ) . not . toBeCalled ( ) ;
55
55
} ) ;
56
56
57
- it ( 'Should throw error when email is not valid format' , async ( ) => {
57
+ it ( 'Should send error when email is not valid format' , async ( ) => {
58
58
const response = await addHeaders ( request . post ( endpoint )
59
59
. send ( { email : '123' } )
60
60
) ;
@@ -66,7 +66,7 @@ describe('Login basic route', () => {
66
66
expect ( createTokensSpy ) . not . toBeCalled ( ) ;
67
67
} ) ;
68
68
69
- it ( 'Should throw error when password is not valid format' , async ( ) => {
69
+ it ( 'Should send error when password is not valid format' , async ( ) => {
70
70
const response = await addHeaders ( request . post ( endpoint )
71
71
. send ( {
72
72
@@ -81,7 +81,7 @@ describe('Login basic route', () => {
81
81
expect ( createTokensSpy ) . not . toBeCalled ( ) ;
82
82
} ) ;
83
83
84
- it ( 'Should throw error when user not registered for email' , async ( ) => {
84
+ it ( 'Should send error when user not registered for email' , async ( ) => {
85
85
const response = await addHeaders ( request . post ( endpoint )
86
86
. send ( {
87
87
@@ -95,7 +95,7 @@ describe('Login basic route', () => {
95
95
expect ( createTokensSpy ) . not . toBeCalled ( ) ;
96
96
} ) ;
97
97
98
- it ( 'Should throw error for wrong password' , async ( ) => {
98
+ it ( 'Should send error for wrong password' , async ( ) => {
99
99
const response = await addHeaders ( request . post ( endpoint )
100
100
. send ( {
101
101
email : USER_EMAIL ,
0 commit comments