Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
filipecabaco committed Mar 1, 2025
1 parent 663a897 commit 3166353
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/realtime/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ defmodule Realtime.Application do

use Application
require Logger
alias DBConnection.App

alias Realtime.Repo.Replica

defmodule JwtSecretError, do: defexception([:message])
defmodule JwtClaimValidatorsError, do: defexception([:message])

Expand Down
3 changes: 2 additions & 1 deletion test/integration/rt_channel_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,9 @@ defmodule Realtime.Integration.RtChannelTest do

WebsocketClient.send_event(socket, topic, "presence", payload)

assert_receive %Phoenix.Socket.Message{topic: ^topic, event: "phx_reply", payload: %{"status" => "ok"}}
assert_receive %Message{event: "presence_diff", payload: %{"joins" => joins, "leaves" => %{}}, topic: ^topic}
refute_receive %Message{topic: ^topic}

join_payload = joins |> Map.values() |> hd() |> get_in(["metas"]) |> hd()
assert get_in(join_payload, ["name"]) == payload.payload.name
assert get_in(join_payload, ["t"]) == payload.payload.t
Expand Down

0 comments on commit 3166353

Please # to comment.