account_test.go 789 B

12345678910111213141516171819202122232425262728293031
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. var (
  8. testAccountMid int64 = 152
  9. testExp int64 = 10
  10. )
  11. func TestSaveFigure(t *testing.T) {
  12. once.Do(startService)
  13. s.AccountReg(context.TODO(), 7593623)
  14. }
  15. // go test -test.v -test.run TestAccountExp
  16. func TestAccountExp(t *testing.T) {
  17. Convey("TestSaveFigure put account exp", t, WithService(func(s *Service) {
  18. So(s.AccountReg(context.TODO(), 10), ShouldBeNil)
  19. }))
  20. Convey("TestAccountExp put account exp", t, WithService(func(s *Service) {
  21. So(s.AccountExp(context.TODO(), testAccountMid, testExp), ShouldBeNil)
  22. }))
  23. Convey("TestAccountViewVideo put account exp", t, WithService(func(s *Service) {
  24. So(s.AccountViewVideo(context.TODO(), testAccountMid), ShouldBeNil)
  25. }))
  26. }