• erio's avatar
    test: add unit tests for billing, websearch, and notify systems · 9028d208
    erio authored
    Billing (25 tests):
    - CalculateCostUnified: nil resolver fallback, token/per_request/image modes
    - GetModelPricingWithChannel: nil/partial/full channel overrides
    - resolveAccountStatsCost: four-level priority chain integration tests
    
    WebSearch (18 tests):
    - PopulateWebSearchUsage: nil input, manager states, QuotaLimit nil/*int64
    - ResetWebSearchUsage: nil manager error
    - Manager.ResetUsage: nil Redis
    - shouldEmulateWebSearch: full decision chain (8 scenarios)
    
    Notify (36 tests):
    - ParseNotifyEmails/MarshalNotifyEmails: old/new format, roundtrip
    - crossedDownward: boundary values, threshold semantics
    - checkQuotaDimCrossings: mixed dimensions, disabled/zero skip
    9028d208
websearch_config_test.go 7.97 KB