498f407585
Introduce optional Apple account-backed credits with scoped gateway access while preserving local and BYOK paths. Refresh assistant behavior, tests, privacy disclosures, docs, and the website for the 2.0 experience.
29 lines
932 B
Swift
29 lines
932 B
Swift
// HostAppURLRegistryTests.swift
|
|
// OSGKeyboardTests
|
|
|
|
@testable import OSGKeyboardShared
|
|
import XCTest
|
|
|
|
final class HostAppURLRegistryTests: XCTestCase {
|
|
func testWeChatLookup() {
|
|
let entry = HostAppURLRegistry.lookup(bundleId: "com.tencent.xin")
|
|
XCTAssertEqual(entry?.returnURLString, "weixin://")
|
|
XCTAssertEqual(entry?.displayNameKey, "hostApp.wechat")
|
|
}
|
|
|
|
func testUnknownBundleReturnsNil() {
|
|
XCTAssertNil(HostAppURLRegistry.lookup(bundleId: "com.apple.MobileSMS"))
|
|
XCTAssertNil(HostAppURLRegistry.lookup(bundleId: nil))
|
|
XCTAssertNil(HostAppURLRegistry.lookup(bundleId: ""))
|
|
}
|
|
|
|
func testQuerySchemesIncludesWeChat() {
|
|
XCTAssertTrue(HostAppURLRegistry.querySchemes.contains("weixin"))
|
|
}
|
|
|
|
func testEntriesHaveUniqueBundleIds() {
|
|
let ids = HostAppURLRegistry.entries.map(\.bundleId)
|
|
XCTAssertEqual(Set(ids).count, ids.count)
|
|
}
|
|
}
|