From 8b38429a31a940011810b5df97334ca195daec87 Mon Sep 17 00:00:00 2001 From: Chris Sexton <3216719+chrissexton@users.noreply.github.com> Date: Wed, 22 Dec 2021 02:58:13 -0500 Subject: [PATCH] fix reminder test after reformat --- plugins/reminder/reminder_test.go | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/plugins/reminder/reminder_test.go b/plugins/reminder/reminder_test.go index 0f97c55..20d880c 100644 --- a/plugins/reminder/reminder_test.go +++ b/plugins/reminder/reminder_test.go @@ -212,30 +212,24 @@ func TestCancelMiss(t *testing.T) { func TestLimitList(t *testing.T) { c, mb, td := setup(t) defer td() - c.config.Set("Reminder.MaxBatchAdd", "10") + c.config.Set("Reminder.MaxBatchAdd", "100") c.config.Set("Reminder.MaxList", "25") assert.NotNil(t, c) //Someone can redo this with a single batch add, but I can't locally due to an old version of sqllite (maybe). - res := c.message(makeMessage("!remind testuser every 1h for 10h don't fail this test")) - assert.True(t, res) - res = c.message(makeMessage("!remind testuser every 1h for 10h don't fail this test")) - assert.True(t, res) - res = c.message(makeMessage("!remind testuser every 1h for 10h don't fail this test")) + res := c.message(makeMessage("!remind testuser every 1h for 30h don't fail this test")) assert.True(t, res) res = c.message(makeMessage("!list reminders")) assert.True(t, res) - assert.Len(t, mb.Messages, 4) + assert.Len(t, mb.Messages, 2) assert.Contains(t, mb.Messages[0], "Sure tester, I'll remind testuser.") - assert.Contains(t, mb.Messages[1], "Sure tester, I'll remind testuser.") - assert.Contains(t, mb.Messages[2], "Sure tester, I'll remind testuser.") for i := 0; i < 25; i++ { - assert.Contains(t, mb.Messages[3], fmt.Sprintf("%d) tester -> testuser :: don't fail this test", i+1)) + assert.Contains(t, mb.Messages[1], fmt.Sprintf("%d) tester -> testuser :: don't fail this test", i+1)) } - assert.Contains(t, mb.Messages[3], "more...") + assert.Contains(t, mb.Messages[1], "more...") - assert.NotContains(t, mb.Messages[3], "26) tester -> testuser") + assert.NotContains(t, mb.Messages[1], "26) tester -> testuser") } func TestHelp(t *testing.T) {