Allow submitting empty bio as widget

This commit is contained in:
Kalle
2026-09-06 11:30:22 +03:00
parent 50e9ff20c0
commit 0babe21a8f
7 changed files with 28 additions and 15 deletions

View File

@@ -59,8 +59,11 @@ describe("PlusVotingRepository.findAllUsersForVoting", () => {
expect(bio).toBeNull();
});
test("returns no bio for an empty bio widget", async () => {
const bio = await bioOf([{ id: "bio", settings: { bio: "" } }]);
test.each([
{ why: "unset", value: null },
{ why: "empty string", value: "" },
])("returns no bio for a bio widget with an $why bio", async ({ value }) => {
const bio = await bioOf([{ id: "bio", settings: { bio: value } }]);
expect(bio).toBeNull();
});