This commit is contained in:
onysd 2026-07-20 23:43:56 +03:00
parent ebb0be38d9
commit 865b5ff4f4
10 changed files with 43 additions and 29 deletions

View file

@ -114,7 +114,7 @@ func TestServiceRebrandsEveryLanguagePackProjection(t *testing.T) {
t.Fatalf("%s projection: %v", name, err)
}
appName := findLangPackString(pack.Strings, "AppName")
if appName == nil || appName.Value != "Telesrv" || appName.ZeroValue != "No Telesrv accounts" || appName.OneValue != "One Telesrv account" || appName.TwoValue != "Two Telesrv accounts" || appName.FewValue != "Few Telesrv accounts" || appName.ManyValue != "Many Telesrv accounts" || appName.OtherValue != "Other Telesrv accounts" {
if appName == nil || appName.Value != "OwpenGram" || appName.ZeroValue != "No OwpenGram accounts" || appName.OneValue != "One OwpenGram account" || appName.TwoValue != "Two OwpenGram accounts" || appName.FewValue != "Few OwpenGram accounts" || appName.ManyValue != "Many OwpenGram accounts" || appName.OtherValue != "Other OwpenGram accounts" {
t.Fatalf("%s AppName = %+v, want all value forms rebranded", name, appName)
}
if got := stringValue(pack.Strings, "TranslationLink"); got != "https://chat.example/root/en" {
@ -129,7 +129,7 @@ func TestServiceRebrandsEveryLanguagePackProjection(t *testing.T) {
if err != nil {
t.Fatalf("list languages: %v", err)
}
if len(languages) != 1 || languages[0].Name != "Telesrv English" || languages[0].NativeName != "Telesrv English" || languages[0].TranslationsURL != "https://chat.example/root/en" {
if len(languages) != 1 || languages[0].Name != "OwpenGram English" || languages[0].NativeName != "OwpenGram English" || languages[0].TranslationsURL != "https://chat.example/root/en" {
t.Fatalf("languages = %+v, want branded metadata", languages)
}
}

View file

@ -84,7 +84,7 @@ func TestCreateCatalogRevisionPreservesHistoricalRevision(t *testing.T) {
t.Fatalf("current=%+v found=%v", current, found)
}
historical, found, _ := svc.GiftRevisionByID(ctx, first.Gift.RevisionID)
if !found || historical.Stars != 50 || historical.Title != "Telesrv Pin" {
if !found || historical.Stars != 50 || historical.Title != "OwpenGram Pin" {
t.Fatalf("historical=%+v found=%v", historical, found)
}
if _, err := svc.SetCatalogEnabled(ctx, first.Gift.ID+999, false); !errors.Is(err, domain.ErrStarGiftNotFound) {