Ver Fonte

Updates a test for the tui

arianagiroux há 2 semanas atrás
pai
commit
42749a7a93
2 ficheiros alterados com 2 adições e 2 exclusões
  1. 1 1
      tui.go
  2. 1 1
      tui_test.go

+ 1 - 1
tui.go

@@ -71,7 +71,7 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 	// widget specifc keyhandling
 	var cmds []tea.Cmd
 	switch m.widget.(type) {
-	case IssueCollection:
+	case IssueCollection: // TODO handle updates to IssueCollection widgets in its own update func
 		if msg, ok := msg.(tea.KeyMsg); ok {
 			switch msg.String() {
 			case "j":

+ 1 - 1
tui_test.go

@@ -20,7 +20,7 @@ func Test_Model_Init(t *testing.T) {
 
 func Test_Model_Update_quit_on_keymsg(t *testing.T) {
 	testModel := Model{}
-	testKey := tea.Key{Type: tea.KeyRunes, Runes: []rune{'q'}}
+	testKey := tea.Key{Type: tea.KeyCtrlC}
 	testMsg := tea.KeyMsg(testKey)
 
 	model, cmd := testModel.Update(testMsg)