Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grdsdev committed Dec 2, 2024
1 parent 88780b6 commit fc406ea
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Tests/RealtimeTests/RealtimeTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ final class RealtimeTests: XCTestCase {
headers: ["apikey": apiKey],
heartbeatInterval: 1,
reconnectDelay: 1,
timeoutInterval: 2
timeoutInterval: 2,
accessToken: {
"custom.access.token"
}
),
ws: ws,
http: http
Expand Down Expand Up @@ -100,7 +103,7 @@ final class RealtimeTests: XCTestCase {
"event" : "phx_join",
"join_ref" : "1",
"payload" : {
"access_token" : "anon.api.key",
"access_token" : "custom.access.token",
"config" : {
"broadcast" : {
"ack" : false,
Expand Down Expand Up @@ -179,7 +182,7 @@ final class RealtimeTests: XCTestCase {
"event" : "phx_join",
"join_ref" : "1",
"payload" : {
"access_token" : "anon.api.key",
"access_token" : "custom.access.token",
"config" : {
"broadcast" : {
"ack" : false,
Expand All @@ -201,7 +204,7 @@ final class RealtimeTests: XCTestCase {
"event" : "phx_join",
"join_ref" : "2",
"payload" : {
"access_token" : "anon.api.key",
"access_token" : "custom.access.token",
"config" : {
"broadcast" : {
"ack" : false,
Expand Down Expand Up @@ -322,7 +325,7 @@ final class RealtimeTests: XCTestCase {
assertInlineSnapshot(of: request?.urlRequest, as: .raw(pretty: true)) {
"""
POST https://localhost:54321/realtime/v1/api/broadcast
Authorization: Bearer anon.api.key
Authorization: Bearer custom.access.token
Content-Type: application/json
apiKey: anon.api.key
Expand Down

0 comments on commit fc406ea

Please sign in to comment.