Skip to content

Commit 88fb87a

Browse files
committed
Fix tests
1 parent 4beb556 commit 88fb87a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

apps/codebattle/test/codebattle_web/channels/group_tournament_channel_test.exs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ defmodule CodebattleWeb.GroupTournamentChannelTest do
1717
end)
1818

1919
user = insert(:user, name: "invite-user")
20-
topic = "group_tournament:#{insert_group_tournament!().id}"
20+
group_tournament = insert_group_tournament!()
21+
topic = "group_tournament:#{group_tournament.id}"
22+
23+
# Grant the user access to the tournament
24+
Codebattle.UserGroupTournament.Context.get_or_create(user, group_tournament)
2125

2226
user_token = Phoenix.Token.sign(socket(UserSocket), "user_token", user.id)
2327
{:ok, socket} = connect(UserSocket, %{"token" => user_token})

0 commit comments

Comments
 (0)