Updates to /connector/exchange/restore_test.go

Extends coverage for item attachments with Mail base.
This commit is contained in:
Danny Adams 2023-02-02 00:20:05 -05:00
parent 6f592c144e
commit 2bfc7f180d

View File

@ -176,7 +176,7 @@ func (suite *ExchangeRestoreSuite) TestRestoreExchangeObject() {
},
},
{
name: "Test Mail: Item Attachment",
name: "Test Mail: Event Item Attachment",
bytes: mockconnector.GetMockMessageWithItemAttachmentEvent("Event Item Attachment"),
category: path.EmailCategory,
destination: func(t *testing.T, ctx context.Context) string {
@ -187,6 +187,18 @@ func (suite *ExchangeRestoreSuite) TestRestoreExchangeObject() {
return *folder.GetId()
},
},
{
name: "Test Mail: Mail Item Attachment",
bytes: mockconnector.GetMockMessageWithItemAttachmentMessage("Message Item Attachment"),
category: path.EmailCategory,
destination: func(t *testing.T, ctx context.Context) string {
folderName := "TestRestoreMailItemAttachMail: " + common.FormatSimpleDateTime(now)
folder, err := suite.ac.Mail().CreateMailFolder(ctx, userID, folderName)
require.NoError(t, err)
return *folder.GetId()
},
},
{
name: "Test Mail: One Large Attachment",
bytes: mockconnector.GetMockMessageWithLargeAttachment("Restore Large Attachment"),