From 47e67d9b64b4915dcd48be0f99f6d2b52822c2c5 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Mon, 11 Jan 2021 12:03:27 +0900 Subject: [PATCH] Add methods to clear data of instances and users table for testing --- plume-models/src/instance.rs | 4 +++- plume-models/src/users.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plume-models/src/instance.rs b/plume-models/src/instance.rs index 9e25a6b8..4ae62f51 100644 --- a/plume-models/src/instance.rs +++ b/plume-models/src/instance.rs @@ -307,7 +307,9 @@ pub(crate) mod tests { } 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] diff --git a/plume-models/src/users.rs b/plume-models/src/users.rs index 2b751e45..07a3051d 100644 --- a/plume-models/src/users.rs +++ b/plume-models/src/users.rs @@ -1172,7 +1172,9 @@ pub(crate) mod tests { } 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]