summaryrefslogtreecommitdiff
path: root/bilibili/request_test.go
blob: ed7d33eb2c3569ee0b395bf8b74394a2168fecd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package bilibili

import (
	"github.com/keuin/slbr/logging"
	"log"
	"testing"
)

func Test_callGet(t *testing.T) {
	// an always-fail request should not panic
	bi := NewBilibili(logging.NewWrappedLogger(log.Default(), "main"))
	_, err := callGet[BaseResponse[struct{}]](bi, "https://256.256.256.256")
	if err == nil {
		t.Fatalf("the artificial request should fail, but it haven't")
	}
}