mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-05 22:03:36 +08:00
14 lines
390 B
Go
14 lines
390 B
Go
package aiservice
|
|
|
|
import "testing"
|
|
|
|
func TestAICheckSQLLocalizesHighRiskWarningForEnglish(t *testing.T) {
|
|
service := NewService()
|
|
service.AISetLanguage("en-US")
|
|
|
|
result := service.AICheckSQL("DROP TABLE users")
|
|
if result.WarningMessage != "High-risk SQL: DROP permanently deletes database objects" {
|
|
t.Fatalf("expected localized English warning, got %q", result.WarningMessage)
|
|
}
|
|
}
|