feat: define get captcha cooldown period interface

This commit is contained in:
realaravinth
2022-05-14 16:27:15 +05:30
parent 9d7bb3c0be
commit 09a8591cb4
2 changed files with 6 additions and 0 deletions

View File

@@ -136,6 +136,9 @@ pub async fn database_works<'a, T: MCDatabase>(
assert!(db.captcha_exists(None, c.key).await.unwrap());
assert!(db.captcha_exists(Some(p.username), c.key).await.unwrap());
// get captcha cooldown duration
assert_eq!(db.get_captcha_cooldown(c.key).await.unwrap(), c.duration);
// add captcha levels
db.add_captcha_levels(p.username, c.key, l).await.unwrap();