member_test.go 300 B

123456789101112131415
  1. package model
  2. import (
  3. "net/url"
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. )
  7. func TestBuildFaceURL(t *testing.T) {
  8. face := BuildFaceURL("/bfs/facepri/4a259f715b63157f24f76521231480438058436e.jpg")
  9. u, err := url.Parse(face)
  10. assert.Nil(t, err)
  11. assert.NotNil(t, u.Query().Get("token"))
  12. }