Add methods to clear data of instances and users table for testing
This commit is contained in:
parent
1d042e1bb2
commit
47e67d9b64
@ -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]
|
||||||
|
@ -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]
|
||||||
|
Loading…
Reference in New Issue
Block a user