mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 21:13:10 +12:00
fix: don't raise error on keyword input to create interface
This commit is contained in:
parent
6d3b00f77f
commit
c31fbc9c3e
2 changed files with 5 additions and 1 deletions
|
@ -496,7 +496,7 @@ defmodule Ash.CodeInterface do
|
|||
unquote(Macro.escape(interface_options))
|
||||
)},
|
||||
else:
|
||||
{params_or_opts,
|
||||
{Map.new(params_or_opts),
|
||||
Spark.Options.validate!(
|
||||
opts,
|
||||
unquote(Macro.escape(interface_options))
|
||||
|
|
|
@ -206,4 +206,8 @@ defmodule Ash.Test.CodeInterfaceTest do
|
|||
assert User.create!().first_name == "fred"
|
||||
assert User.create!("joe").first_name == "joe"
|
||||
end
|
||||
|
||||
test "it handles keyword inputs properly" do
|
||||
assert User.create!("fred", [last_name: "weasley"], [actor: nil])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue