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.example.test/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")
	}
}
