mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-13 11:05:40 +00:00
duplicate email check and address clippy warnings
This commit is contained in:
@@ -86,7 +86,7 @@ mod tests {
|
||||
register_and_signin(NAME2, EMAIL2, PASSWORD).await;
|
||||
let (data, _creds, signin_resp) = signin(NAME1, PASSWORD).await;
|
||||
let cookies = get_cookie!(signin_resp);
|
||||
let mut app = get_app!(data).await;
|
||||
let app = get_app!(data).await;
|
||||
|
||||
let msg = AddNotification {
|
||||
to: NAME2.into(),
|
||||
@@ -95,7 +95,7 @@ mod tests {
|
||||
};
|
||||
|
||||
let send_notification_resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
post_request!(&msg, V1_API_ROUTES.notifications.add)
|
||||
.cookie(cookies.clone())
|
||||
.to_request(),
|
||||
|
||||
@@ -114,7 +114,7 @@ mod tests {
|
||||
let (_data, _creds2, signin_resp2) = signin(NAME2, PASSWORD).await;
|
||||
let cookies = get_cookie!(signin_resp);
|
||||
let cookies2 = get_cookie!(signin_resp2);
|
||||
let mut app = get_app!(data).await;
|
||||
let app = get_app!(data).await;
|
||||
|
||||
let msg = AddNotification {
|
||||
to: NAME2.into(),
|
||||
@@ -123,7 +123,7 @@ mod tests {
|
||||
};
|
||||
|
||||
let send_notification_resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
post_request!(&msg, V1_API_ROUTES.notifications.add)
|
||||
.cookie(cookies.clone())
|
||||
.to_request(),
|
||||
@@ -132,7 +132,7 @@ mod tests {
|
||||
assert_eq!(send_notification_resp.status(), StatusCode::OK);
|
||||
|
||||
let get_notifications_resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
test::TestRequest::get()
|
||||
.uri(V1_API_ROUTES.notifications.get)
|
||||
.cookie(cookies2.clone())
|
||||
|
||||
@@ -93,7 +93,7 @@ mod tests {
|
||||
let (_data, _creds2, signin_resp2) = signin(NAME2, PASSWORD).await;
|
||||
let cookies = get_cookie!(signin_resp);
|
||||
let cookies2 = get_cookie!(signin_resp2);
|
||||
let mut app = get_app!(data).await;
|
||||
let app = get_app!(data).await;
|
||||
|
||||
let msg = AddNotification {
|
||||
to: NAME2.into(),
|
||||
@@ -102,7 +102,7 @@ mod tests {
|
||||
};
|
||||
|
||||
let send_notification_resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
post_request!(&msg, V1_API_ROUTES.notifications.add)
|
||||
.cookie(cookies.clone())
|
||||
.to_request(),
|
||||
@@ -111,7 +111,7 @@ mod tests {
|
||||
assert_eq!(send_notification_resp.status(), StatusCode::OK);
|
||||
|
||||
let get_notifications_resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
test::TestRequest::get()
|
||||
.uri(V1_API_ROUTES.notifications.get)
|
||||
.cookie(cookies2.clone())
|
||||
@@ -131,7 +131,7 @@ mod tests {
|
||||
id: notification.id,
|
||||
};
|
||||
let mark_read_resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
post_request!(&mark_read_payload, V1_API_ROUTES.notifications.mark_read)
|
||||
.cookie(cookies2.clone())
|
||||
.to_request(),
|
||||
@@ -140,7 +140,7 @@ mod tests {
|
||||
assert_eq!(mark_read_resp.status(), StatusCode::OK);
|
||||
|
||||
let get_notifications_resp = test::call_service(
|
||||
&mut app,
|
||||
&app,
|
||||
test::TestRequest::get()
|
||||
.uri(V1_API_ROUTES.notifications.get)
|
||||
.cookie(cookies2.clone())
|
||||
|
||||
Reference in New Issue
Block a user