mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-12 02:25:41 +00:00
get notifications
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
|
||||
use actix::prelude::*;
|
||||
use actix_web::{web, HttpResponse, Responder};
|
||||
use m_captcha::{defense::LevelBuilder, master::AddSiteBuilder, DefenseBuilder, MCaptchaBuilder};
|
||||
use m_captcha::{
|
||||
defense::LevelBuilder, master::AddSiteBuilder, DefenseBuilder, MCaptchaBuilder,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use super::record_fetch;
|
||||
|
||||
@@ -80,7 +80,8 @@ mod tests {
|
||||
|
||||
let get_config_resp = test::call_service(
|
||||
&mut app,
|
||||
post_request!(&get_config_payload, V1_API_ROUTES.pow.get_config).to_request(),
|
||||
post_request!(&get_config_payload, V1_API_ROUTES.pow.get_config)
|
||||
.to_request(),
|
||||
)
|
||||
.await;
|
||||
assert_eq!(get_config_resp.status(), StatusCode::OK);
|
||||
@@ -119,7 +120,9 @@ mod tests {
|
||||
err.error,
|
||||
format!(
|
||||
"{}",
|
||||
ServiceError::CaptchaError(m_captcha::errors::CaptchaError::StringNotFound)
|
||||
ServiceError::CaptchaError(
|
||||
m_captcha::errors::CaptchaError::StringNotFound
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -127,7 +127,8 @@ mod tests {
|
||||
)
|
||||
.await;
|
||||
assert_eq!(validate_client_token.status(), StatusCode::OK);
|
||||
let resp: CaptchaValidateResp = test::read_body_json(validate_client_token).await;
|
||||
let resp: CaptchaValidateResp =
|
||||
test::read_body_json(validate_client_token).await;
|
||||
assert!(resp.valid);
|
||||
|
||||
// string not found
|
||||
|
||||
Reference in New Issue
Block a user