mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +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))
|
unquote(Macro.escape(interface_options))
|
||||||
)},
|
)},
|
||||||
else:
|
else:
|
||||||
{params_or_opts,
|
{Map.new(params_or_opts),
|
||||||
Spark.Options.validate!(
|
Spark.Options.validate!(
|
||||||
opts,
|
opts,
|
||||||
unquote(Macro.escape(interface_options))
|
unquote(Macro.escape(interface_options))
|
||||||
|
|
|
@ -206,4 +206,8 @@ defmodule Ash.Test.CodeInterfaceTest do
|
||||||
assert User.create!().first_name == "fred"
|
assert User.create!().first_name == "fred"
|
||||||
assert User.create!("joe").first_name == "joe"
|
assert User.create!("joe").first_name == "joe"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "it handles keyword inputs properly" do
|
||||||
|
assert User.create!("fred", [last_name: "weasley"], [actor: nil])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue