use sqlx::{Connection, SqliteConnection, migrate};
extern crate tokio;
mod common;
use common::DATABASE_URL;

#[tokio::test]
async fn db_connection() {
    let conn = SqliteConnection::connect(DATABASE_URL).await;
    assert!(conn.is_ok());
}

#[tokio::test]
async fn db_migrate() {
    let mut conn = SqliteConnection::connect(DATABASE_URL).await.unwrap();
    let migration = migrate!("db/migrations").run(&mut conn).await;
    assert!(migration.is_ok());
}
