mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
update user secret
This commit is contained in:
@@ -44,6 +44,7 @@ async fn auth_works() {
|
||||
let (_, _, signin_resp) = register_and_signin(NAME, EMAIL, PASSWORD).await;
|
||||
let cookies = get_cookie!(signin_resp);
|
||||
|
||||
// chech if get user secret works
|
||||
let resp = test::call_service(
|
||||
&mut app,
|
||||
test::TestRequest::get()
|
||||
@@ -54,6 +55,17 @@ async fn auth_works() {
|
||||
.await;
|
||||
assert_eq!(resp.status(), StatusCode::OK);
|
||||
|
||||
// check if update user secret works
|
||||
let resp = test::call_service(
|
||||
&mut app,
|
||||
test::TestRequest::post()
|
||||
.cookie(cookies.clone())
|
||||
.uri(GET_SECRET)
|
||||
.to_request(),
|
||||
)
|
||||
.await;
|
||||
assert_eq!(resp.status(), StatusCode::OK);
|
||||
|
||||
// 2. check if duplicate username is allowed
|
||||
let msg = Register {
|
||||
username: NAME.into(),
|
||||
|
||||
Reference in New Issue
Block a user