polish(db): clearer maker label; assert group_key and vocabularies in seed tests

This commit is contained in:
2026-06-02 11:25:10 +02:00
parent adc7c61ee2
commit 5ee9fd88f1
2 changed files with 11 additions and 7 deletions
+10 -6
View File
@@ -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"
);
}
}