forked from baron/baron-sso
비밀번호 재설정 중복 완료 요청 문제 수정
This commit is contained in:
26
backend/internal/service/sms_service_test.go
Normal file
26
backend/internal/service/sms_service_test.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package service
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestBuildNaverSmsRequest_UsesSMSForShortContent(t *testing.T) {
|
||||
req := buildNaverSmsRequest("0262857755", "821012345678", "123456")
|
||||
|
||||
if req.Type != "SMS" {
|
||||
t.Fatalf("expected SMS, got %s", req.Type)
|
||||
}
|
||||
if req.Subject != "" {
|
||||
t.Fatalf("expected empty subject for SMS, got %q", req.Subject)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildNaverSmsRequest_UsesLMSForLongContent(t *testing.T) {
|
||||
content := "[Baron 로그인] 비밀번호 재설정 링크: http://sso-test.hmac.kr/api/v1/auth/password/reset/v/1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
|
||||
req := buildNaverSmsRequest("0262857755", "821012345678", content)
|
||||
|
||||
if req.Type != "LMS" {
|
||||
t.Fatalf("expected LMS, got %s", req.Type)
|
||||
}
|
||||
if req.Subject == "" {
|
||||
t.Fatal("expected LMS subject to be set")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user