Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sora233 committed Nov 5, 2021
1 parent af5f51d commit 5fe724b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lsp/weibo/freshCookie_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
package weibo

import (
localutils "github.com/Sora233/DDBOT/utils"
"github.com/stretchr/testify/assert"
"net/http"
"testing"
"time"
)

func TestFreshCookie(t *testing.T) {
cookies, err := FreshCookie()
var cookies []*http.Cookie
var err error
localutils.Retry(5, time.Second, func() bool {
cookies, err = FreshCookie()
return err == nil
})
assert.Nil(t, err)
assert.NotEmpty(t, cookies)
}

0 comments on commit 5fe724b

Please sign in to comment.