fix: failing tests
This commit is contained in:
parent
a4239ce09b
commit
86c032004e
2 changed files with 4 additions and 7 deletions
|
|
@ -14,6 +14,7 @@ defmodule MvWeb.JoinLiveTest do
|
|||
import Phoenix.LiveViewTest
|
||||
import Ecto.Query
|
||||
|
||||
alias Ecto.Adapters.SQL.Sandbox
|
||||
alias Mv.Membership
|
||||
alias Mv.Repo
|
||||
|
||||
|
|
@ -45,6 +46,9 @@ defmodule MvWeb.JoinLiveTest do
|
|||
count_before = count_join_requests()
|
||||
{:ok, view, _html} = live(conn, "/join")
|
||||
|
||||
# Allow LiveView process to use the same Ecto sandbox so the test sees the created JoinRequest.
|
||||
Sandbox.allow(Repo, conn.private[:ecto_sandbox], view.pid)
|
||||
|
||||
view
|
||||
|> form("#join-form", %{
|
||||
"email" => "newuser#{System.unique_integer([:positive])}@example.com",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue