Файли
2026-11-08 03:46:11 +00:00

20 рядки
558 B
Go

package shared
import "testing"
func TestMainKeyboardHasMyListsButton(t *testing.T) {
keyboard := MainKeyboard()
if !keyboard.IsPersistent {
t.Fatal("MainKeyboard() is not persistent")
}
if !keyboard.ResizeKeyboard {
t.Fatal("MainKeyboard() does not resize")
}
if len(keyboard.Keyboard) != 1 || len(keyboard.Keyboard[0]) != 1 {
t.Fatalf("MainKeyboard() = %v, want a single row with one button", keyboard.Keyboard)
}
if got := keyboard.Keyboard[0][0].Text; got != MyListsLabel {
t.Fatalf("button text = %q, want %q", got, MyListsLabel)
}
}