github.com/blend/go-sdk@v1.20240719.1/web/session_test.go (about) 1 /* 2 3 Copyright (c) 2024 - Present. Blend Labs, Inc. All rights reserved 4 Use of this source code is governed by a MIT license that can be found in the LICENSE file. 5 6 */ 7 8 package web 9 10 import ( 11 "testing" 12 13 "github.com/blend/go-sdk/assert" 14 ) 15 16 func TestSession(t *testing.T) { 17 assert := assert.New(t) 18 19 session := &Session{} 20 session.WithBaseURL("https://foo.com/bar") 21 assert.Equal("https://foo.com/bar", session.BaseURL) 22 session.WithUserAgent("example-string") 23 assert.Equal("example-string", session.UserAgent) 24 session.WithRemoteAddr("10.10.32.1") 25 assert.Equal("10.10.32.1", session.RemoteAddr) 26 }