action_test.go 453 B

123456789101112131415161718192021
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestAction(t *testing.T) {
  8. c := context.Background()
  9. Convey("action set", t, WithService(func(s *Service) {
  10. err := s.UpActionLike(c, 894717392, 5464686, 23, 1, 32, "test")
  11. So(err, ShouldBeNil)
  12. like, hate, err := s.ActionCount(c, 894717392, 5464686, 23, 1)
  13. So(err, ShouldBeNil)
  14. So(hate, ShouldEqual, 0)
  15. So(like, ShouldEqual, 32)
  16. }))
  17. }