mirror of
https://github.com/ash-project/ash.git
synced 2024-09-19 21:13:10 +12:00
fix: add resource to Ash.Seed.seed! in Ash.Generator.seed! (#1227)
This commit is contained in:
parent
1b4edfd066
commit
4d35117649
2 changed files with 7 additions and 1 deletions
|
@ -147,7 +147,7 @@ defmodule Ash.Generator do
|
|||
seed_input(resource, generators)
|
||||
|> Enum.at(0)
|
||||
|
||||
Ash.Seed.seed!(input)
|
||||
Ash.Seed.seed!(resource, input)
|
||||
end
|
||||
|
||||
@doc """
|
||||
|
|
|
@ -281,6 +281,12 @@ defmodule Ash.Test.GeneratorTest do
|
|||
end
|
||||
end
|
||||
|
||||
describe "seed" do
|
||||
test "it seeds correctly a resource" do
|
||||
assert %Author{} = Ash.Generator.seed!(Author, @meta_generator)
|
||||
end
|
||||
end
|
||||
|
||||
describe "built in generators" do
|
||||
for type <- Enum.uniq(Ash.Type.builtin_types()), type != Ash.Type.Keyword do
|
||||
for type <- [{:array, type}, type] do
|
||||
|
|
Loading…
Reference in a new issue