@@ -142,7 +142,7 @@ defmodule Absinthe.Execution.SubscriptionTest do
142
142
:ok ,
143
143
topic: args . client_id ,
144
144
prime: fn % { context: % { prime_id: prime_id } } ->
145
- { :ok , Enum . map ( args . prime_data , & ( % { id: prime_id , name: & 1 } ) ) }
145
+ { :ok , Enum . map ( args . prime_data , & % { id: prime_id , name: & 1 } ) }
146
146
end
147
147
}
148
148
end
@@ -154,8 +154,7 @@ defmodule Absinthe.Execution.SubscriptionTest do
154
154
config fn args , _ ->
155
155
{
156
156
:ok ,
157
- topic: args . client_id ,
158
- ordinal: fn % { version: version } -> version end
157
+ topic: args . client_id , ordinal: fn % { version: version } -> version end
159
158
}
160
159
end
161
160
end
@@ -217,7 +216,7 @@ defmodule Absinthe.Execution.SubscriptionTest do
217
216
assert % {
218
217
event: "subscription:data" ,
219
218
result: % { data: % { "thing" => "foo" } , ordinal: nil } ,
220
- topic: topic ,
219
+ topic: topic
221
220
} == msg
222
221
end
223
222
@@ -261,7 +260,7 @@ defmodule Absinthe.Execution.SubscriptionTest do
261
260
msg = % {
262
261
event: "subscription:data" ,
263
262
result: % { data: % { "multipleTopics" => "foo" } , ordinal: nil } ,
264
- topic: topic ,
263
+ topic: topic
265
264
}
266
265
267
266
Absinthe.Subscription . publish ( PubSub , "foo" , multiple_topics: "topic_1" )
@@ -363,7 +362,7 @@ defmodule Absinthe.Execution.SubscriptionTest do
363
362
assert % {
364
363
event: "subscription:data" ,
365
364
result: % { data: % { "user" => % { "id" => "1" , "name" => "foo" } } , ordinal: nil } ,
366
- topic: topic ,
365
+ topic: topic
367
366
} == msg
368
367
end
369
368
@@ -411,7 +410,7 @@ defmodule Absinthe.Execution.SubscriptionTest do
411
410
assert % {
412
411
event: "subscription:data" ,
413
412
result: % { data: % { "thing" => "foo" } , ordinal: nil } ,
414
- topic: topic ,
413
+ topic: topic
415
414
} == msg
416
415
end
417
416
@@ -430,7 +429,7 @@ defmodule Absinthe.Execution.SubscriptionTest do
430
429
assert % {
431
430
event: "subscription:data" ,
432
431
result: % { data: % { "thing" => "foo" } , ordinal: nil } ,
433
- topic: topic ,
432
+ topic: topic
434
433
} == msg
435
434
end )
436
435
@@ -642,7 +641,7 @@ defmodule Absinthe.Execution.SubscriptionTest do
642
641
assert % {
643
642
event: "subscription:data" ,
644
643
result: % { data: % { "thing" => "foo" } , ordinal: nil } ,
645
- topic: topic ,
644
+ topic: topic
646
645
} == msg
647
646
648
647
# Subscription events
@@ -675,13 +674,15 @@ defmodule Absinthe.Execution.SubscriptionTest do
675
674
context: % { prime_id: "test_prime_id" }
676
675
)
677
676
678
- assert { :more , % {
679
- data: % { "prime" => % { "id" => "test_prime_id" , "name" => "name1" } } ,
680
- continuation: continuation } }
681
- = Absinthe . continue ( continuation )
677
+ assert { :more ,
678
+ % {
679
+ data: % { "prime" => % { "id" => "test_prime_id" , "name" => "name1" } } ,
680
+ continuation: continuation
681
+ } } =
682
+ Absinthe . continue ( continuation )
682
683
683
- assert { :ok , % { data: % { "prime" => % { "id" => "test_prime_id" , "name" => "name2" } } } }
684
- = Absinthe . continue ( continuation )
684
+ assert { :ok , % { data: % { "prime" => % { "id" => "test_prime_id" , "name" => "name2" } } } } =
685
+ Absinthe . continue ( continuation )
685
686
end
686
687
687
688
@ query """
@@ -733,14 +734,16 @@ defmodule Absinthe.Execution.SubscriptionTest do
733
734
}
734
735
)
735
736
736
- assert { :more , % {
737
- data: % { "primeOrdinal" => % { "name" => "first_user" } } ,
738
- ordinal: 1 ,
739
- continuation: continuation } }
740
- = Absinthe . continue ( continuation )
737
+ assert { :more ,
738
+ % {
739
+ data: % { "primeOrdinal" => % { "name" => "first_user" } } ,
740
+ ordinal: 1 ,
741
+ continuation: continuation
742
+ } } =
743
+ Absinthe . continue ( continuation )
741
744
742
- assert { :ok , % { data: % { "primeOrdinal" => % { "name" => "second_user" } } , ordinal: 2 } }
743
- = Absinthe . continue ( continuation )
745
+ assert { :ok , % { data: % { "primeOrdinal" => % { "name" => "second_user" } } , ordinal: 2 } } =
746
+ Absinthe . continue ( continuation )
744
747
end
745
748
746
749
defp run_subscription ( query , schema , opts \\ [ ] ) do
0 commit comments