@@ -35,13 +35,13 @@ describe('POST /create_record', () => {
3535 expect ( authCookie ) . toContain ( 'adminforth_' ) ;
3636 } ) ;
3737
38- it ( 'should block unauthorized access after login' , async ( ) => {
38+ it ( 'throw an error, that unauthorized access is blocked after login' , async ( ) => {
3939 const res = await agent
4040 . post ( '/adminapi/v1/create_record' ) ;
4141 expect ( res . status ) . toEqual ( 401 ) ;
4242 } ) ;
4343
44- it ( 'should throw error, that resource is not found' , async ( ) => {
44+ it ( 'throw an error, that resource is not found' , async ( ) => {
4545 const res = await agent
4646 . set ( 'Cookie' , authCookie )
4747 . post ( '/adminapi/v1/create_record' )
@@ -53,7 +53,7 @@ describe('POST /create_record', () => {
5353 expect ( res . body . error ) . toBe ( "Resource 'non_existent_resource' not found" ) ;
5454 } ) ;
5555
56- it ( 'should throw error, that resource is not found' , async ( ) => {
56+ it ( 'throw an error, that resource is not found' , async ( ) => {
5757 const res = await agent
5858 . set ( 'Cookie' , authCookie )
5959 . post ( '/adminapi/v1/create_record' )
@@ -65,7 +65,7 @@ describe('POST /create_record', () => {
6565 expect ( res . body . error ) . toBe ( "Action is not allowed" ) ;
6666 } ) ;
6767
68- it ( 'should throw error, that column is required' , async ( ) => {
68+ it ( 'throw an error, that column is required' , async ( ) => {
6969 const res = await agent
7070 . set ( 'Cookie' , authCookie )
7171 . post ( '/adminapi/v1/create_record' )
@@ -82,7 +82,7 @@ describe('POST /create_record', () => {
8282 } ) ;
8383
8484 let createdRecordId : string ;
85- it ( 'skip required column (NEEDS TO BE FIXED)' , async ( ) => {
85+ it ( 'should skip required column (NEEDS TO BE FIXED)' , async ( ) => {
8686 const res = await agent
8787 . set ( 'Cookie' , authCookie )
8888 . post ( '/adminapi/v1/create_record' )
@@ -100,7 +100,7 @@ describe('POST /create_record', () => {
100100 expect ( res . body . error ) . toBeUndefined ( ) ;
101101 } ) ;
102102
103- it ( 'dont create record with existing id' , async ( ) => {
103+ it ( 'throw an error, that record with existing id cannot be created ' , async ( ) => {
104104 const res = await agent
105105 . set ( 'Cookie' , authCookie )
106106 . post ( '/adminapi/v1/create_record' )
@@ -116,7 +116,7 @@ describe('POST /create_record', () => {
116116 expect ( res . body . error ) . toBe ( `Record with id '${ createdRecordId } ' already exists` ) ;
117117 } ) ;
118118
119- it ( 'dont allow to set backend only field' , async ( ) => {
119+ it ( 'throw an error, that backend only field cannot be modified ' , async ( ) => {
120120 const res = await agent
121121 . set ( 'Cookie' , authCookie )
122122 . post ( '/adminapi/v1/create_record' )
@@ -132,7 +132,7 @@ describe('POST /create_record', () => {
132132 expect ( res . body . error ) . toBe ( `Field "secret_field" cannot be modified as it is restricted from creation (backendOnly is true).` ) ;
133133 } ) ;
134134
135- it ( 'dont allow to set field , that is hidden from create view' , async ( ) => {
135+ it ( 'throw an error , that field is hidden from create view' , async ( ) => {
136136 const res = await agent
137137 . set ( 'Cookie' , authCookie )
138138 . post ( '/adminapi/v1/create_record' )
@@ -164,7 +164,7 @@ describe('POST /create_record', () => {
164164 expect ( res . body . error ) . toBe ( `Model must contain at least two words` ) ;
165165 } ) ;
166166
167- it ( 'throw an error that value can`t be less than minValue' , async ( ) => {
167+ it ( 'throw an error, that value can`t be less than minValue' , async ( ) => {
168168 const res = await agent
169169 . set ( 'Cookie' , authCookie )
170170 . post ( '/adminapi/v1/create_record' )
@@ -181,7 +181,7 @@ describe('POST /create_record', () => {
181181 } ) ;
182182
183183
184- it ( 'throw an error that value can`t be greater than maxValue' , async ( ) => {
184+ it ( 'throw an error, that value can`t be greater than maxValue' , async ( ) => {
185185 const res = await agent
186186 . set ( 'Cookie' , authCookie )
187187 . post ( '/adminapi/v1/create_record' )
@@ -197,7 +197,7 @@ describe('POST /create_record', () => {
197197 expect ( res . body . error ) . toBe ( `Value in \"production_year\" must be less than ${ new Date ( ) . getFullYear ( ) } ` ) ;
198198 } ) ;
199199
200- it ( 'dont allow to create record by hook' , async ( ) => {
200+ it ( 'throw an error, that create action is not allowed by hook' , async ( ) => {
201201 const res = await agent
202202 . set ( 'Cookie' , authCookie )
203203 . post ( '/adminapi/v1/create_record' )
@@ -498,7 +498,7 @@ describe('POST /update_record', () => {
498498 expect ( res . body . error ) . toBe ( `Model must contain at least two words` ) ;
499499 } ) ;
500500
501- it ( 'should throw error that value can`t be less than minValue' , async ( ) => {
501+ it ( 'should throw error, that value can`t be less than minValue' , async ( ) => {
502502 const res = await agent
503503 . set ( 'Cookie' , authCookie )
504504 . post ( '/adminapi/v1/update_record' )
@@ -514,7 +514,7 @@ describe('POST /update_record', () => {
514514 expect ( res . body . error ) . toBe ( `Value in \"production_year\" must be greater than 1900` ) ;
515515 } ) ;
516516
517- it ( 'should throw error that value can`t be greater than maxValue' , async ( ) => {
517+ it ( 'should throw error, that value can`t be greater than maxValue' , async ( ) => {
518518 const res = await agent
519519 . set ( 'Cookie' , authCookie )
520520 . post ( '/adminapi/v1/update_record' )
0 commit comments