mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 01:55:40 +00:00
chore: cleanup and addressing clippy lints
This commit is contained in:
@@ -160,7 +160,7 @@ pub async fn database_works<'a, T: MCDatabase>(
|
||||
db.create_notification(an).await.unwrap();
|
||||
|
||||
// 2. Get notifications
|
||||
let notifications = db.get_all_unread_notifications(&an.to).await.unwrap();
|
||||
let notifications = db.get_all_unread_notifications(an.to).await.unwrap();
|
||||
assert_eq!(notifications.len(), 2);
|
||||
assert_eq!(notifications[0].heading.as_ref().unwrap(), an.heading);
|
||||
|
||||
@@ -168,7 +168,7 @@ pub async fn database_works<'a, T: MCDatabase>(
|
||||
db.mark_notification_read(an.to, notifications[0].id.unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
let new_notifications = db.get_all_unread_notifications(&an.to).await.unwrap();
|
||||
let new_notifications = db.get_all_unread_notifications(an.to).await.unwrap();
|
||||
assert_eq!(new_notifications.len(), 1);
|
||||
|
||||
// create captcha
|
||||
|
||||
@@ -59,7 +59,7 @@ async fn everyting_works() {
|
||||
},
|
||||
];
|
||||
|
||||
const add_notification: AddNotification = AddNotification {
|
||||
const ADD_NOTIFICATION: AddNotification = AddNotification {
|
||||
from: NAME,
|
||||
to: NAME,
|
||||
message: MESSAGE,
|
||||
@@ -84,5 +84,5 @@ async fn everyting_works() {
|
||||
key: CAPTCHA_SECRET,
|
||||
description: CAPTCHA_DESCRIPTION,
|
||||
};
|
||||
database_works(&db, &p, &c, &LEVELS, &TRAFFIC_PATTERN, &add_notification).await;
|
||||
database_works(&db, &p, &c, &LEVELS, &TRAFFIC_PATTERN, &ADD_NOTIFICATION).await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user