Skip to content

Commit

Permalink
test: fix broken tests due to Jason upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
tlux committed Mar 27, 2024
1 parent f3754b0 commit e5f66f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions test/graphql_ws_client/drivers/gun_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ defmodule GraphQLWSClient.Drivers.GunTest do

describe "connect/1" do
@init_payload Jason.encode!(%{
"type" => "connection_init",
"payload" => @conn.init_payload
type: "connection_init",
payload: @conn.init_payload
})

@ack_payload Jason.encode!(%{"type" => "connection_ack"})
@ack_payload Jason.encode!(%{type: "connection_ack"})

test "success", %{pid: pid, stream_ref: stream_ref} do
WSClientMock
Expand Down
12 changes: 6 additions & 6 deletions test/graphql_ws_client/message_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ defmodule GraphQLWSClient.MessageTest do
%Message{id: "__id__", type: :complete},
Jason
) ==
Jason.encode!(%{"id" => "__id__", "type" => "complete"})
Jason.encode!(%{id: "__id__", type: "complete"})
end

test "with payload" do
Expand All @@ -59,11 +59,11 @@ defmodule GraphQLWSClient.MessageTest do
Jason
) ==
Jason.encode!(%{
"id" => "__id__",
"type" => "subscribe",
"payload" => %{
"query" => "__query__",
"variables" => %{"foo" => "bar"}
id: "__id__",
type: "subscribe",
payload: %{
query: "__query__",
variables: %{"foo" => "bar"}
}
})
end
Expand Down

0 comments on commit e5f66f0

Please sign in to comment.