use umbral_auth::{AuthPlugin, AuthUser};
async fn boot() {
umbral_testing::boot(|b| b.plugin(AuthPlugin::<AuthUser>::default())).await;
}
#[tokio::test]
async fn a_plugins_tables_are_created_without_being_listed() {
boot().await;
let user = umbral_auth::create_user_with_flags("alice", "alice@example.com", "pw", true, true)
.await
.expect("the auth_user table exists, with every column the plugin's model declares");
assert_eq!(user.username, "alice");
assert!(user.is_staff);
let found = AuthUser::objects()
.filter(umbral_auth::auth_user::USERNAME.eq("alice"))
.first()
.await
.expect("query")
.expect("the row round-trips");
assert_eq!(found.email, "alice@example.com");
}