File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,25 @@ final class AuthClientTests: XCTestCase {
57
57
storage = nil
58
58
}
59
59
60
+ func testAuthClientInitialization( ) {
61
+ let client = makeSUT ( )
62
+
63
+ assertInlineSnapshot ( of: client. configuration. headers, as: . customDump) {
64
+ """
65
+ [
66
+ " X-Client-Info " : " auth-swift/0.0.0 " ,
67
+ " X-Supabase-Api-Version " : " 2024-01-01 " ,
68
+ " apikey " : " eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 "
69
+ ]
70
+ """
71
+ }
72
+
73
+ XCTAssertEqual ( client. clientID, 1 )
74
+
75
+ let client2 = makeSUT ( )
76
+ XCTAssertEqual ( client2. clientID, 2 )
77
+ }
78
+
60
79
func testOnAuthStateChanges( ) async throws {
61
80
let session = Session . validSession
62
81
let sut = makeSUT ( )
Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ final class SupabaseClientTests: XCTestCase {
78
78
]
79
79
"""
80
80
}
81
- expectNoDifference ( client. headers, client. auth. configuration. headers)
82
81
expectNoDifference ( client. headers, client. functions. headers. dictionary)
83
82
expectNoDifference ( client. headers, client. storage. configuration. headers)
84
83
expectNoDifference ( client. headers, client. rest. configuration. headers)
You can’t perform that action at this time.
0 commit comments