Files
openclaw/apps/macos/Tests/OpenClawIPCTests/AnthropicAuthControlsSmokeTests.swift

30 lines
888 B
Swift
Raw Normal View History

2025-12-24 17:42:14 +01:00
import Testing
2026-01-30 03:15:10 +01:00
@testable import OpenClaw
2025-12-24 17:42:14 +01:00
@Suite(.serialized)
@MainActor
struct AnthropicAuthControlsSmokeTests {
@Test func anthropicAuthControlsBuildsBodyLocal() {
let pkce = AnthropicOAuth.PKCE(verifier: "verifier", challenge: "challenge")
let view = AnthropicAuthControls(
connectionMode: .local,
oauthStatus: .connected(expiresAtMs: 1_700_000_000_000),
pkce: pkce,
code: "code#state",
statusText: "Detected code",
autoDetectClipboard: false,
autoConnectClipboard: false)
_ = view.body
}
@Test func anthropicAuthControlsBuildsBodyRemote() {
let view = AnthropicAuthControls(
connectionMode: .remote,
oauthStatus: .missingFile,
pkce: nil,
code: "",
statusText: nil)
_ = view.body
}
}