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

This commit is contained in:
Kitaiti Makoto
2021-01-16 16:39:12 +09:00
parent 31418b1079
commit 1d042e1bb2
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -1171,6 +1171,10 @@ pub(crate) mod tests {
vec![admin, user, other]
}
pub(crate) fn clear_users(conn: &Conn) {
diesel::delete(crate::schema::users::table).execute(conn).unwrap();
}
#[test]
fn find_by() {
let r = rockets();