Skip to content

Commit de3fd76

Browse files
committed
Fix tests setup
1 parent f0c5758 commit de3fd76

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/plausible_web/controllers/auth_controller_test.exs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,8 @@ defmodule PlausibleWeb.AuthControllerTest do
707707
} do
708708
another_owner = new_user()
709709
another_site = new_site(owner: another_owner)
710-
add_member(another_site.team, user: user, role: :admin)
710+
another_team = another_owner |> team_of() |> Plausible.Teams.complete_setup()
711+
add_member(another_team, user: user, role: :admin)
711712

712713
segment =
713714
insert(:segment,
@@ -728,7 +729,8 @@ defmodule PlausibleWeb.AuthControllerTest do
728729
} do
729730
another_owner = new_user()
730731
another_site = new_site(owner: another_owner)
731-
add_member(another_site.team, user: user, role: :admin)
732+
another_team = another_owner |> team_of() |> Plausible.Teams.complete_setup()
733+
add_member(another_team, user: user, role: :admin)
732734

733735
segment =
734736
insert(:segment,
@@ -749,7 +751,7 @@ defmodule PlausibleWeb.AuthControllerTest do
749751
} do
750752
another_owner = new_user()
751753
another_site = new_site(owner: another_owner)
752-
team = team_of(another_owner)
754+
team = another_owner |> team_of() |> Plausible.Teams.complete_setup()
753755
add_member(another_site.team, user: user, role: :owner)
754756

755757
delete(conn, "/me")
@@ -766,7 +768,7 @@ defmodule PlausibleWeb.AuthControllerTest do
766768
personal_team = team_of(user)
767769
another_owner = new_user()
768770
_another_site = new_site(owner: another_owner)
769-
another_team = team_of(another_owner)
771+
another_team = another_owner |> team_of() |> Plausible.Teams.complete_setup()
770772
add_member(another_team, user: user, role: :owner)
771773

772774
delete(conn, "/me")

0 commit comments

Comments
 (0)