subject_test.go 793 B

1234567891011121314151617181920212223242526272829303132
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestSubject(t *testing.T) {
  8. c := context.Background()
  9. Convey("subject test", t, WithService(func(s *Service) {
  10. _, err := s.Subject(c, 1, 1)
  11. So(err, ShouldBeNil)
  12. }))
  13. Convey("subject test", t, WithService(func(s *Service) {
  14. _, err := s.AdminGetSubject(c, 1, 1)
  15. So(err, ShouldBeNil)
  16. }))
  17. Convey("subject test", t, WithService(func(s *Service) {
  18. err := s.AdminSubjectMid(c, 1, 1, 1, 1, "test")
  19. So(err, ShouldBeNil)
  20. }))
  21. Convey("subject test", t, WithService(func(s *Service) {
  22. err := s.AdminSubRegist(c, 1, 1, 1, 1, "test")
  23. So(err, ShouldBeNil)
  24. }))
  25. Convey("subject test", t, WithService(func(s *Service) {
  26. _, err := s.GetSubject(c, 1, 1)
  27. So(err, ShouldBeNil)
  28. }))
  29. }