Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardd committed May 3, 2022
1 parent fdd08ea commit f22e7f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/absinthe/phoenix_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,16 @@ defmodule Absinthe.PhoenixTest do

assert_reply(ref, :ok, %{subscriptionId: subscription_ref})

Absinthe.Subscription.publish(TestEndpoint, 1, ordinal: "ordinal_topic")
Absinthe.Subscription.publish(Absinthe.Phoenix.TestEndpoint, 1, ordinal: "ordinal_topic")

assert_push("subscription:data", push)
expected = %{result: %{data: %{"ordinal" => 1}, ordinal: 1}, subscriptionId: subscription_ref}
assert expected == push

Absinthe.Subscription.publish(TestEndpoint, 0, ordinal: "ordinal_topic")
Absinthe.Subscription.publish(Absinthe.Phoenix.TestEndpoint, 0, ordinal: "ordinal_topic")
# This message should not generate a notification because it has a lower ordinal

Absinthe.Subscription.publish(TestEndpoint, 2, ordinal: "ordinal_topic")
Absinthe.Subscription.publish(Absinthe.Phoenix.TestEndpoint, 2, ordinal: "ordinal_topic")

assert_push("subscription:data", push)
expected = %{result: %{data: %{"ordinal" => 2}, ordinal: 2}, subscriptionId: subscription_ref}
Expand Down

0 comments on commit f22e7f6

Please sign in to comment.