Tests for deleted flag GODT-496

This commit is contained in:
Jakub
2020-08-12 11:06:07 +02:00
committed by Michal Horejsek
parent f3773c9d78
commit 803353e300
10 changed files with 278 additions and 57 deletions

View File

@ -179,10 +179,6 @@ func (c *IMAPClient) AppendBody(mailboxName, subject, from, to, body string) *IM
return c.SendCommand(cmd)
}
func (c *IMAPClient) Delete(ids string) *IMAPResponse {
return c.AddFlags(ids, "\\Deleted")
}
func (c *IMAPClient) Copy(ids, newMailboxName string) *IMAPResponse {
return c.SendCommand(fmt.Sprintf("COPY %s \"%s\"", ids, newMailboxName))
}
@ -207,6 +203,14 @@ func (c *IMAPClient) MarkAsUnstarred(ids string) *IMAPResponse {
return c.RemoveFlags(ids, "\\Flagged")
}
func (c *IMAPClient) MarkAsDeleted(ids string) *IMAPResponse {
return c.AddFlags(ids, "\\Deleted")
}
func (c *IMAPClient) MarkAsUndeleted(ids string) *IMAPResponse {
return c.RemoveFlags(ids, "\\Deleted")
}
func (c *IMAPClient) SetFlags(ids, flags string) *IMAPResponse {
return c.changeFlags(ids, flags, "")
}
@ -223,6 +227,10 @@ func (c *IMAPClient) changeFlags(ids, flags, op string) *IMAPResponse {
return c.SendCommand(fmt.Sprintf("STORE %s %sflags (%s)", ids, op, flags))
}
func (c *IMAPClient) Expunge() *IMAPResponse {
return c.SendCommand("EXPUNGE")
}
// IDLE
func (c *IMAPClient) StartIDLE() *IMAPResponse {