subject_test.go 480 B

123456789101112131415161718192021
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/main/reply/model"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestUpSubjectAttr(t *testing.T) {
  9. c := context.Background()
  10. Convey("test update subject attr", t, WithService(func(s *Service) {
  11. _, err := s.FreezeSub(c, 23, "asd", []int64{1}, 1, 1, "test")
  12. So(err, ShouldBeNil)
  13. sub, err := s.Subject(c, 1, 1)
  14. So(err, ShouldBeNil)
  15. So(sub.AttrVal(model.SubAttrFrozen), ShouldEqual, 1)
  16. }))
  17. }