28e4059d66
Add SMZDM to the cover-required platform list on both client and server, register a 800x800 native cover spec in the admin cover catalog, and normalize the desktop-client `smzdm_image_fetch_failed` adapter error to a user-friendly Chinese prompt across the publisher error pipeline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
937 B
Go
31 lines
937 B
Go
package app
|
|
|
|
import "testing"
|
|
|
|
func TestPublishPlatformRequiresCover(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
for _, platformID := range []string{"weixin_gzh", "baijiahao", "dongchedi", "smzdm"} {
|
|
if !publishPlatformRequiresCover(platformID) {
|
|
t.Fatalf("publishPlatformRequiresCover(%q) = false, want true", platformID)
|
|
}
|
|
}
|
|
|
|
if publishPlatformRequiresCover("zhihu") {
|
|
t.Fatal("publishPlatformRequiresCover(\"zhihu\") = true, want false")
|
|
}
|
|
}
|
|
|
|
func TestPublishCoverRequirementCallersIncludeWeixinGzh(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
accounts := []platformAccountSeed{{PlatformID: "weixin_gzh"}, {PlatformID: "smzdm"}}
|
|
if !publishBatchRequiresCover(accounts) {
|
|
t.Fatal("publishBatchRequiresCover() = false for cover-required platforms, want true")
|
|
}
|
|
|
|
if !schedulePublishPlatformsRequireCover([]string{"weixin_gzh", "smzdm"}) {
|
|
t.Fatal("schedulePublishPlatformsRequireCover() = false for cover-required platforms, want true")
|
|
}
|
|
}
|