summaryrefslogtreecommitdiff
path: root/bilibili/room_profile_test.go
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-07-02 14:48:47 +0800
committerKeuin <[email protected]>2023-07-02 14:49:17 +0800
commitb6eb2c0da4e653c6fdd278bcbdcd55ec376cd481 (patch)
treebc0d58aedf6e8613d21351cd3cdfd8cd5b5999e2 /bilibili/room_profile_test.go
parentb8d0d0c3b6b2ffe40921aa4c247c101dd0ce958d (diff)
Refactor: move RoomId type to the correct package. Type all room ID usages.
Diffstat (limited to 'bilibili/room_profile_test.go')
-rw-r--r--bilibili/room_profile_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/bilibili/room_profile_test.go b/bilibili/room_profile_test.go
index 0abd8dd..a1d68c5 100644
--- a/bilibili/room_profile_test.go
+++ b/bilibili/room_profile_test.go
@@ -1,7 +1,7 @@
package bilibili
import (
- "github.com/keuin/slbr/common"
+ testing2 "github.com/keuin/slbr/common/testing"
"github.com/keuin/slbr/logging"
"log"
"testing"
@@ -9,7 +9,7 @@ import (
func TestBilibili_GetRoomProfile(t *testing.T) {
// get an online live room for testing
- liveList, err := common.GetLiveListForGuestUser()
+ liveList, err := testing2.GetLiveListForGuestUser()
if err != nil {
t.Fatalf("cannot get live list for testing: %v", err)
}
@@ -17,7 +17,7 @@ func TestBilibili_GetRoomProfile(t *testing.T) {
if len(lives) <= 0 {
t.Fatalf("no live for guest available")
}
- roomId := common.RoomId(lives[0].Roomid)
+ roomId := lives[0].Roomid
logger := log.Default()
bi := NewBilibili(logging.NewWrappedLogger(logger, "test-logger"))
@@ -28,7 +28,7 @@ func TestBilibili_GetRoomProfile(t *testing.T) {
if resp.Code != 0 ||
resp.Message != "ok" ||
resp.Data.UID <= 0 ||
- resp.Data.RoomID != int(roomId) ||
+ resp.Data.RoomID != roomId ||
resp.Data.LiveStatus != int(Streaming) ||
resp.Data.Title == "" {
t.Fatalf("Invalid GetRoomProfile response: %v", resp)