chore: migrate tests to also run with mariadb

This commit is contained in:
realaravinth
2022-07-22 19:14:18 +05:30
parent 912b342e0e
commit 249b6461ee
24 changed files with 352 additions and 59 deletions

View File

@@ -60,7 +60,18 @@ pub mod tests {
use crate::*;
#[actix_rt::test]
pub async fn notification_mark_read_works() {
async fn notification_mark_read_works_pg() {
let data = pg::get_data().await;
notification_mark_read_works(data).await;
}
#[actix_rt::test]
async fn notification_mark_read_works_maria() {
let data = maria::get_data().await;
notification_mark_read_works(data).await;
}
pub async fn notification_mark_read_works(data: ArcData) {
const NAME1: &str = "notifuser122";
const NAME2: &str = "notiuser222";
const PASSWORD: &str = "longpassworddomain";
@@ -68,7 +79,6 @@ pub mod tests {
const EMAIL2: &str = "testnotification222@a.com";
const HEADING: &str = "testing notifications get";
const MESSAGE: &str = "testing notifications get message";
let data = get_data().await;
let data = &data;
delete_user(data, NAME1).await;