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 {
5757 storage = nil
5858 }
5959
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+
6079 func testOnAuthStateChanges( ) async throws {
6180 let session = Session . validSession
6281 let sut = makeSUT ( )
Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ final class SupabaseClientTests: XCTestCase {
7878 ]
7979 """
8080 }
81- expectNoDifference ( client. headers, client. auth. configuration. headers)
8281 expectNoDifference ( client. headers, client. functions. headers. dictionary)
8382 expectNoDifference ( client. headers, client. storage. configuration. headers)
8483 expectNoDifference ( client. headers, client. rest. configuration. headers)
You can’t perform that action at this time.
0 commit comments