Add projects
This commit is contained in:
parent
2d3a9ad623
commit
8b607dd700
1802 changed files with 503346 additions and 2 deletions
26
backend/internal/watcher/diff/oauth_model_alias_test.go
Normal file
26
backend/internal/watcher/diff/oauth_model_alias_test.go
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
package diff
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/router-for-me/CLIProxyAPI/v7/internal/config"
|
||||
)
|
||||
|
||||
func TestDiffOAuthModelAliasChanges_IncludesDisplayName(t *testing.T) {
|
||||
oldMap := map[string][]config.OAuthModelAlias{
|
||||
"antigravity": {
|
||||
{Name: "claude-opus-4-6-thinking", Alias: "claude-antigravity-opus-4-6-thinking", DisplayName: "Antigravity Opus 4.6"},
|
||||
},
|
||||
}
|
||||
newMap := map[string][]config.OAuthModelAlias{
|
||||
"antigravity": {
|
||||
{Name: "claude-opus-4-6-thinking", Alias: "claude-antigravity-opus-4-6-thinking", DisplayName: "Antigravity Opus 4.6 (Thinking)"},
|
||||
},
|
||||
}
|
||||
|
||||
changes, affected := DiffOAuthModelAliasChanges(oldMap, newMap)
|
||||
expectContains(t, changes, "oauth-model-alias[antigravity]: updated (1 -> 1 entries)")
|
||||
if len(affected) != 1 || affected[0] != "antigravity" {
|
||||
t.Fatalf("expected antigravity to be affected, got %#v", affected)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue