From e5f66f0a007479cc74b929e86737d69e90be1178 Mon Sep 17 00:00:00 2001 From: Tobias Casper Date: Wed, 27 Mar 2024 22:10:52 +0100 Subject: [PATCH] test: fix broken tests due to Jason upgrade --- test/graphql_ws_client/drivers/gun_test.exs | 6 +++--- test/graphql_ws_client/message_test.exs | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/graphql_ws_client/drivers/gun_test.exs b/test/graphql_ws_client/drivers/gun_test.exs index 4a67d19..61ff500 100644 --- a/test/graphql_ws_client/drivers/gun_test.exs +++ b/test/graphql_ws_client/drivers/gun_test.exs @@ -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 diff --git a/test/graphql_ws_client/message_test.exs b/test/graphql_ws_client/message_test.exs index 0463660..64d074f 100644 --- a/test/graphql_ws_client/message_test.exs +++ b/test/graphql_ws_client/message_test.exs @@ -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 @@ -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