mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-29 18:05:36 +02:00
Associate messages with a user
This commit is contained in:
parent
84785b7a60
commit
2b78a8cb51
7 changed files with 71 additions and 41 deletions
server
|
@ -343,11 +343,11 @@ func testCacheAttachments(t *testing.T, c *messageCache) {
|
|||
require.Equal(t, "https://ntfy.sh/file/aCaRURL.jpg", messages[1].Attachment.URL)
|
||||
require.Equal(t, "1.2.3.4", messages[1].Sender.String())
|
||||
|
||||
size, err := c.AttachmentBytesUsed("1.2.3.4")
|
||||
size, err := c.AttachmentBytesUsedBySender("1.2.3.4")
|
||||
require.Nil(t, err)
|
||||
require.Equal(t, int64(30000), size)
|
||||
|
||||
size, err = c.AttachmentBytesUsed("5.6.7.8")
|
||||
size, err = c.AttachmentBytesUsedBySender("5.6.7.8")
|
||||
require.Nil(t, err)
|
||||
require.Equal(t, int64(0), size)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue