mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-13 02:55:39 +00:00
duplicate email check and address clippy warnings
This commit is contained in:
@@ -33,7 +33,7 @@ async fn auth_works() {
|
||||
const PASSWORD: &str = "longpassword";
|
||||
const EMAIL: &str = "testuser1@a.com";
|
||||
|
||||
let mut app = get_app!(data).await;
|
||||
let app = get_app!(data).await;
|
||||
|
||||
delete_user(NAME, &data).await;
|
||||
|
||||
@@ -45,7 +45,7 @@ async fn auth_works() {
|
||||
email: None,
|
||||
};
|
||||
let resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
post_request!(&msg, ROUTES.auth.register).to_request(),
|
||||
)
|
||||
.await;
|
||||
@@ -108,7 +108,7 @@ async fn auth_works() {
|
||||
|
||||
// 5. signout
|
||||
let signout_resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
test::TestRequest::get()
|
||||
.uri(ROUTES.auth.logout)
|
||||
.cookie(cookies)
|
||||
@@ -128,7 +128,7 @@ async fn serverside_password_validation_works() {
|
||||
let data = Data::new().await;
|
||||
delete_user(NAME, &data).await;
|
||||
|
||||
let mut app = get_app!(data).await;
|
||||
let app = get_app!(data).await;
|
||||
|
||||
// checking to see if server-side password validation (password == password_config)
|
||||
// works
|
||||
@@ -139,7 +139,7 @@ async fn serverside_password_validation_works() {
|
||||
email: None,
|
||||
};
|
||||
let resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
post_request!(®ister_msg, ROUTES.auth.register).to_request(),
|
||||
)
|
||||
.await;
|
||||
|
||||
@@ -54,16 +54,16 @@ async fn protected_routes_work() {
|
||||
|
||||
let (data, _, signin_resp) = register_and_signin(NAME, EMAIL, PASSWORD).await;
|
||||
let cookies = get_cookie!(signin_resp);
|
||||
let mut app = get_app!(data).await;
|
||||
let app = get_app!(data).await;
|
||||
|
||||
for url in get_protected_urls.iter() {
|
||||
let resp =
|
||||
test::call_service(&mut app, test::TestRequest::get().uri(url).to_request())
|
||||
test::call_service(&app, test::TestRequest::get().uri(url).to_request())
|
||||
.await;
|
||||
assert_eq!(resp.status(), StatusCode::FOUND);
|
||||
|
||||
let authenticated_resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
test::TestRequest::get()
|
||||
.uri(url)
|
||||
.cookie(cookies.clone())
|
||||
|
||||
Reference in New Issue
Block a user