Ask for location before proximity search
This commit is contained in:
@@ -76,6 +76,15 @@ func TestIndependentRequestParts(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLocalSearchClarification(t *testing.T) {
|
||||
if got := LocalSearchClarification("найди ближайший ресторан"); got == "" {
|
||||
t.Fatal("proximity search without place must ask for location")
|
||||
}
|
||||
if got := LocalSearchClarification("найди ближайший ресторан в Сочи"); got != "" {
|
||||
t.Fatalf("explicit place must proceed, got %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestTravelSearchClarification(t *testing.T) {
|
||||
if got := TravelSearchClarification("Найди билеты", nil); got == "" {
|
||||
t.Fatal("underspecified travel request must ask for missing route and date")
|
||||
|
||||
Reference in New Issue
Block a user