Is there any documentation on actually setting up testing? I want to test my resource before I begin trying to implement my ui, but I can't find how to create or run migrations for the "test" postgres db.
I'm new to elixir and phoenix in general so any direction on where to go to find this information would be appreciated.
My current test looks like
defmodule OpenBudget.BudgetTest do use OpenBudget.DataCase, async: true require Ash.Query test "can create budget" do user = OpenBudget.Accounts.User |> Ash.Changeset.for_create(:register_with_password, %{ email: "[email protected]", hashed_password: "password", password: "password", password_confirmation: "password" }) |> OpenBudget.Accounts.create!() assert user.email == "[email protected]" endend
defmodule OpenBudget.BudgetTest do use OpenBudget.DataCase, async: true require Ash.Query test "can create budget" do user = OpenBudget.Accounts.User |> Ash.Changeset.for_create(:register_with_password, %{ email: "[email protected]", hashed_password: "password", password: "password", password_confirmation: "password" }) |> OpenBudget.Accounts.create!() assert user.email == "[email protected]" endend
The error I get is in the image attached. This error leads me to believe I need to run migrations for my
The Elixir backend framework for unparalleled productivity. Declarative tools that let you stop wasting time. Use with Phoenix LiveView or build APIs in minutes for your front-end of choice.