From 15a28f4584ed2ad07e4b866d4a3c38ae923f09e2 Mon Sep 17 00:00:00 2001 From: Tyler Hawkins <3319104+tyzbit@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:53:35 -0400 Subject: [PATCH] fix(tests): fix history/app tests --- internal/model/history_test.go | 4 ++-- internal/view/app_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/model/history_test.go b/internal/model/history_test.go index 1655675228..439c039163 100644 --- a/internal/model/history_test.go +++ b/internal/model/history_test.go @@ -17,7 +17,7 @@ func TestHistory(t *testing.T) { h.Push(fmt.Sprintf("cmd%d", i)) } - assert.Equal(t, []string{"cmd4", "cmd3", "cmd2"}, h.List()) + assert.Equal(t, []string{"cmd1", "cmd2", "cmd3"}, h.List()) h.Clear() assert.True(t, h.Empty()) } @@ -30,5 +30,5 @@ func TestHistoryDups(t *testing.T) { h.Push("cmd1") h.Push("") - assert.Equal(t, []string{"cmd3", "cmd2", "cmd1"}, h.List()) + assert.Equal(t, []string{"cmd1", "cmd2", "cmd3", "cmd1"}, h.List()) } diff --git a/internal/view/app_test.go b/internal/view/app_test.go index d4d709d952..f6b9663da8 100644 --- a/internal/view/app_test.go +++ b/internal/view/app_test.go @@ -15,5 +15,5 @@ func TestAppNew(t *testing.T) { a := view.NewApp(mock.NewMockConfig()) _ = a.Init("blee", 10) - assert.Equal(t, 14, a.GetActions().Len()) + assert.Equal(t, 15, a.GetActions().Len()) }