Pass actor to CustomFieldValue destroy and load in existing tests
Required after CustomFieldValue gained authorization policies.
This commit is contained in:
parent
bf2d0352c1
commit
17831a0948
2 changed files with 2 additions and 2 deletions
|
|
@ -348,7 +348,7 @@ defmodule Mv.Membership.MemberSearchWithCustomFieldsTest do
|
|||
assert List.first(results).id == member1.id
|
||||
|
||||
# Delete custom field value
|
||||
assert :ok = Ash.destroy(cfv)
|
||||
assert :ok = Ash.destroy(cfv, actor: system_actor)
|
||||
|
||||
# Value should no longer be found
|
||||
deleted_results =
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ defmodule Mv.Membership.Import.MemberCSVTest do
|
|||
member = Enum.find(members, &(&1.email == "withcustom@example.com"))
|
||||
assert member != nil
|
||||
|
||||
{:ok, member_with_cf} = Ash.load(member, :custom_field_values)
|
||||
{:ok, member_with_cf} = Ash.load(member, :custom_field_values, actor: actor)
|
||||
assert length(member_with_cf.custom_field_values) == 1
|
||||
cfv = List.first(member_with_cf.custom_field_values)
|
||||
assert cfv.custom_field_id == custom_field.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue