@@ -175,6 +175,48 @@ module.exports = (
175175 assert . isString ( res . body . result [ 1 ] )
176176 } )
177177
178+ it ( 'it should be successfully performed by the getCaptchaProviders method' , async function ( ) {
179+ this . timeout ( 5000 )
180+
181+ const res = await agent
182+ . post ( `${ basePath } /json-rpc` )
183+ . type ( 'json' )
184+ . send ( {
185+ method : 'getCaptchaProviders' ,
186+ id : 5
187+ } )
188+ . expect ( 'Content-Type' , / j s o n / )
189+ . expect ( 200 )
190+
191+ assert . isObject ( res . body )
192+ assert . propertyVal ( res . body , 'id' , 5 )
193+ assert . isArray ( res . body . result )
194+ assert . isString ( res . body . result [ 0 ] )
195+ assert . strictEqual ( res . body . result [ 0 ] , 'hcaptcha' )
196+ } )
197+
198+ it ( 'it should be successfully performed by the isCaptchaRequired method' , async function ( ) {
199+ this . timeout ( 5000 )
200+
201+ const res = await agent
202+ . post ( `${ basePath } /json-rpc` )
203+ . type ( 'json' )
204+ . send ( {
205+ method : 'isCaptchaRequired' ,
206+ params : {
207+ method : 'login'
208+ } ,
209+ id : 5
210+ } )
211+ . expect ( 'Content-Type' , / j s o n / )
212+ . expect ( 200 )
213+
214+ assert . isObject ( res . body )
215+ assert . propertyVal ( res . body , 'id' , 5 )
216+ assert . isBoolean ( res . body . result )
217+ assert . isOk ( res . body . result )
218+ } )
219+
178220 it ( 'it should be successfully performed by the signIn method' , async function ( ) {
179221 this . timeout ( 5000 )
180222
0 commit comments