smscode_service_test.go 347 B

123456789101112131415161718192021
  1. package service
  2. import (
  3. "testing"
  4. "xiaoniaokuaiyan.com/xiaoniao/dal"
  5. )
  6. func TestSendSMS(t *testing.T) {
  7. var (
  8. mobile = "18310412106"
  9. smsType = 6
  10. )
  11. smsService := &SMSService{
  12. dal.DefaultSMSCodeDal,
  13. }
  14. _, err := smsService.SendSMS(mobile, smsType, map[string]string{"orderId": "bjtest1469800"})
  15. if err != nil {
  16. t.Fatal(err)
  17. }
  18. }