feat: expose public legal agreement pages
This commit is contained in:
@@ -1633,6 +1633,11 @@ func TestServeIMTenantResolveSuccessFromHeader(t *testing.T) {
|
||||
if endpoints["websocket"] != "wss://im.example.com/v0/channels?apikey="+url.QueryEscape(apiKey) {
|
||||
t.Fatalf("unexpected websocket endpoint: %#v", endpoints)
|
||||
}
|
||||
legal := endpoints["legal"].(map[string]any)
|
||||
if legal["user_terms"] != "https://im.example.com/legal/user-terms" ||
|
||||
legal["privacy_policy"] != "https://im.example.com/legal/privacy-policy" {
|
||||
t.Fatalf("unexpected legal endpoints: %#v", legal)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIMHTTPProtocolDoesNotRequireIdempotencyForTenantResolve(t *testing.T) {
|
||||
@@ -1688,6 +1693,11 @@ func TestServeIMTenantResolveUsesForwardedPublicHost(t *testing.T) {
|
||||
endpoints["file"] != "https://api.118im.com/v0/file" {
|
||||
t.Fatalf("unexpected endpoints: %#v", endpoints)
|
||||
}
|
||||
legal := endpoints["legal"].(map[string]any)
|
||||
if legal["user_terms"] != "https://api.118im.com/legal/user-terms" ||
|
||||
legal["privacy_policy"] != "https://api.118im.com/legal/privacy-policy" {
|
||||
t.Fatalf("unexpected legal endpoints: %#v", legal)
|
||||
}
|
||||
}
|
||||
|
||||
func TestServeIMTenantResolveSuccessFromBody(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user