Skip to content

Commit

Permalink
chore: fix ecto compat test
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Oct 5, 2023
1 parent 34e7a20 commit ce26211
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions test/ecto_compatibility_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@ defmodule AshSqlite.EctoCompatibilityTest do
use AshSqlite.RepoCase, async: false
require Ash.Query

defmodule Schema do
use Ecto.Schema

schema "orgs" do
field(:name, :string)
end
end

test "call Ecto.Repo.insert! via Ash Repo" do
org =
%Schema{id: Ash.UUID.generate(), name: "The Org"}
# |> Ecto.Changeset.cast(%{name: "The Org"}, [:name])
# |> Ecto.Changeset.validate_required([:name])
%AshSqlite.Test.Organization{
id: Ash.UUID.generate(),
name: "The Org"
}
|> AshSqlite.TestRepo.insert!()

assert org.name == "The Org"
Expand Down

0 comments on commit ce26211

Please sign in to comment.