fix(captcha): persona-модель вместо захвата профиля браузера

This commit is contained in:
samosvalishe committed 2026-07-13 21:29:34 +03:00
1 parent e009db0b9a
commit 305754cd60
20 files changed
+322 -376

No files matched your search

+29
View File
@@ -134,6 +134,35 @@ func TestParseClient_BrowserInvalid(t *testing.T) {
}
}
func TestParseClient_PlatformDefaultDesktop(t *testing.T) {
c, err := ParseClient(validClientArgs(), io.Discard)
if err != nil {
t.Fatal(err)
}
if c.VK.Platform != PlatformDesktop {
t.Errorf("VK.Platform = %q, want %q", c.VK.Platform, PlatformDesktop)
}
}
func TestParseClient_PlatformMobile(t *testing.T) {
args := append(validClientArgs(), "-platform", "mobile")
c, err := ParseClient(args, io.Discard)
if err != nil {
t.Fatal(err)
}
if c.VK.Platform != PlatformMobile {
t.Errorf("VK.Platform = %q, want %q", c.VK.Platform, PlatformMobile)
}
}
func TestParseClient_PlatformInvalid(t *testing.T) {
args := append(validClientArgs(), "-platform", "tablet")
_, err := ParseClient(args, io.Discard)
if err == nil || !strings.Contains(err.Error(), "invalid -platform") {
t.Errorf("expected platform error, got %v", err)
}
}
func TestParseClient_BondWithoutTCPMode(t *testing.T) {
args := append(validClientArgs(), "-bond")
_, err := ParseClient(args, io.Discard)