fix: hide paid column and add tests
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
carla 2025-12-03 14:56:39 +01:00
parent c3b33b55a5
commit c9678231f9
4 changed files with 26 additions and 366 deletions

View file

@ -33,10 +33,10 @@ defmodule Mv.Membership.MemberFieldVisibilityTest do
field_to_hide = List.first(member_fields)
field_to_show = List.last(member_fields)
# Update settings to hide a field
# Update settings to hide a field (use string keys for JSONB)
{:ok, _updated_settings} =
Mv.Membership.update_settings(settings, %{
member_field_visibility: %{field_to_hide => false}
member_field_visibility: %{Atom.to_string(field_to_hide) => false}
})
# JSONB may convert atom keys to string keys, so we check via show_in_overview? instead
@ -53,10 +53,10 @@ defmodule Mv.Membership.MemberFieldVisibilityTest do
fields_to_hide = Enum.take(member_fields, 2)
fields_to_show = Enum.take(member_fields, -2)
# Update settings to hide some fields
# Update settings to hide some fields (use string keys for JSONB)
visibility_config =
Enum.reduce(fields_to_hide, %{}, fn field, acc ->
Map.put(acc, field, false)
Map.put(acc, Atom.to_string(field), false)
end)
{:ok, _updated_settings} =