2 // Copyright 2020 Blue Static <https://www.bluestatic.org>
3 // This program is free software licensed under the GNU General Public License,
4 // version 3.0. The full text of the license can be found in LICENSE.txt.
5 // SPDX-License-Identifier: GPL-3.0-only
13 func TestReset(t *testing.T) {
16 {"msg1", 1, 4, false},
17 {"msg2", 2, 4, false},
21 msg := mbox.GetMessage(1)
23 t.Errorf("failed to GetMessage #1")
27 t.Errorf("message %v should not be deleted", msg)
30 if err := mbox.Delete(msg); err != nil {
35 t.Errorf("message %v should be deleted", msg)
41 t.Errorf("reset did not un-delete message %v", msg)