polish(db): clearer maker label; assert group_key and vocabularies in seed tests
This commit is contained in:
+10
-6
@@ -34,6 +34,7 @@ async fn seed_creates_vocabularies_and_field_definitions(pool: PgPool) {
|
||||
vocabulary_id: material_vocab.id
|
||||
}
|
||||
);
|
||||
assert_eq!(material_field.group_key.as_deref(), Some("description"));
|
||||
|
||||
let place = fields::field_definition_by_key(db.pool(), "production_place")
|
||||
.await
|
||||
@@ -83,10 +84,13 @@ async fn seed_is_idempotent(pool: PgPool) {
|
||||
.len(),
|
||||
12
|
||||
);
|
||||
assert!(
|
||||
vocab::vocabulary_by_key(db.pool(), "material")
|
||||
.await
|
||||
.unwrap()
|
||||
.is_some()
|
||||
);
|
||||
for key in ["material", "object_name", "technique"] {
|
||||
assert!(
|
||||
vocab::vocabulary_by_key(db.pool(), key)
|
||||
.await
|
||||
.unwrap()
|
||||
.is_some(),
|
||||
"vocabulary {key} should remain after re-seeding"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user