]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Add api test
authorqydysky <qydysky@foxmail.com>
Sat, 6 Jan 2024 17:45:36 +0000 (01:45 +0800)
committerqydysky <qydysky@foxmail.com>
Sat, 6 Jan 2024 17:45:36 +0000 (01:45 +0800)
F/api_test.go

index 5e40590babcb4358539cb86d6e89d0f803946ad3..5fccaedddf604d3d8f9809146ae9074ae6c0b7cd 100644 (file)
@@ -42,3 +42,20 @@ func Test_SearchUP(t *testing.T) {
                t.Fatal()
        }
 }
+
+func Test_Title(t *testing.T) {
+       //获取cookie
+       Get(c.C).Get(`Cookie`)
+       //获取LIVE_BUVID
+       Get(c.C).Get(`LIVE_BUVID`)
+       c.C.Roomid = 394988
+       Get(c.C).getRoomBaseInfo()
+       if c.C.Title == `` {
+               t.Fatal()
+       }
+       c.C.Title = ``
+       Get(c.C).getInfoByRoom()
+       if c.C.Title == `` {
+               t.Fatal()
+       }
+}