Skip to content

Commit 2c79254

Browse files
committed
Add test coverage for isCaptchaRequired method
1 parent 6a34dc8 commit 2c79254

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

test/test-cases/api-sync-mode-sqlite-test-cases.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,28 @@ module.exports = (
195195
assert.strictEqual(res.body.result[0], 'hcaptcha')
196196
})
197197

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', /json/)
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+
198220
it('it should be successfully performed by the signIn method', async function () {
199221
this.timeout(5000)
200222

0 commit comments

Comments
 (0)