package router

import "testing"

func TestReminderHasSubject(t *testing.T) {
	cases := []struct {
		text string
		want bool
	}{
		// The three the box produced, and the reason this file exists.
		{"напомни", false},
		{"ну напомни же", false},
		{"напомни мне", false},
		{"напомни мне пожалуйста", false},
		// Lemma, not literal: none of these forms is the one in the utterance
		// the lexicon lists first.
		{"напоминай", false},
		{"напомнить", false},
		{"remind me", false},
		{"remind me please", false},
		// A real subject, however short.
		{"напомни позвонить маме", true},
		{"напомни про таблетки", true},
		{"напомни выпить воды", true},
		{"remind me to call mom", true},
		// A day is a subject she can ask nothing better about, so she does not
		// ask. This is where reminderBody's stripping would disagree, on purpose.
		{"напомни завтра", true},
		{"напомни в семь", true},
		// A noun that starts like the verb. A stem test would eat it.
		{"напомни про напоминание", true},
		// Empty is subjectless without asking the lexicon anything.
		{"", false},
	}
	for _, c := range cases {
		if got := reminderHasSubject(c.text); got != c.want {
			t.Errorf("reminderHasSubject(%q) = %v, want %v", c.text, got, c.want)
		}
	}
}
