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) {