Add methods to clear data of instances and users table for testing

This commit is contained in:
Kitaiti Makoto 2021-01-11 12:03:27 +09:00
parent 1d042e1bb2
commit 47e67d9b64
2 changed files with 6 additions and 2 deletions

View File

@ -307,7 +307,9 @@ pub(crate) mod tests {
} }
pub(crate) fn clear_instances(conn: &Conn) { pub(crate) fn clear_instances(conn: &Conn) {
diesel::delete(crate::schema::instances::table).execute(conn).unwrap(); diesel::delete(crate::schema::instances::table)
.execute(conn)
.unwrap();
} }
#[test] #[test]

View File

@ -1172,7 +1172,9 @@ pub(crate) mod tests {
} }
pub(crate) fn clear_users(conn: &Conn) { pub(crate) fn clear_users(conn: &Conn) {
diesel::delete(crate::schema::users::table).execute(conn).unwrap(); diesel::delete(crate::schema::users::table)
.execute(conn)
.unwrap();
} }
#[test] #[test]