diff --git a/Tests/MailosaurTests/EmailsTests.swift b/Tests/MailosaurTests/EmailsTests.swift index 554d9f9..3650649 100644 --- a/Tests/MailosaurTests/EmailsTests.swift +++ b/Tests/MailosaurTests/EmailsTests.swift @@ -185,7 +185,7 @@ final class EmailsTests: XCTestCase { try XCTSkipIf(EmailsTestsSetup.verifiedDomain == nil, "Skipping test") let subject = "New message" - let message = try await EmailsTestsSetup.client.messages.create(server: EmailsTestsSetup.server, messageCreateOptions: MessageCreateOptions(to: "anything@\(EmailsTestsSetup.verifiedDomain)", + let message = try await EmailsTestsSetup.client.messages.create(server: EmailsTestsSetup.server, messageCreateOptions: MessageCreateOptions(to: "anything@\(EmailsTestsSetup.verifiedDomain ?? "")", send: true, subject: subject, text: "This is a new email")) @@ -196,9 +196,9 @@ final class EmailsTests: XCTestCase { func testCreateSendHtml() async throws { try XCTSkipIf(EmailsTestsSetup.verifiedDomain == nil, "Skipping test") - + let subject = "New HTML message" - let message = try await EmailsTestsSetup.client.messages.create(server: EmailsTestsSetup.server, messageCreateOptions: MessageCreateOptions(to: "anything@\(EmailsTestsSetup.verifiedDomain)", + let message = try await EmailsTestsSetup.client.messages.create(server: EmailsTestsSetup.server, messageCreateOptions: MessageCreateOptions(to: "anything@\(EmailsTestsSetup.verifiedDomain ?? "")", send: true, subject: subject, html: "
This is a new email.
")) @@ -216,7 +216,7 @@ final class EmailsTests: XCTestCase { fileName: "cat.png", content: data.base64EncodedString()) - let message = try await EmailsTestsSetup.client.messages.create(server: EmailsTestsSetup.server, messageCreateOptions: MessageCreateOptions(to: "anything@\(EmailsTestsSetup.verifiedDomain)", + let message = try await EmailsTestsSetup.client.messages.create(server: EmailsTestsSetup.server, messageCreateOptions: MessageCreateOptions(to: "anything@\(EmailsTestsSetup.verifiedDomain ?? "")", send: true, subject: subject, html: "This is a new email.
", @@ -237,7 +237,7 @@ final class EmailsTests: XCTestCase { let body = "Forwarded message" let targetEmail = EmailsTestsSetup.emails[0] - let message = try await EmailsTestsSetup.client.messages.forward(id: targetEmail.id, messageForwardOptions: MessageForwardOptions(to: "anything@\(EmailsTestsSetup.verifiedDomain)", + let message = try await EmailsTestsSetup.client.messages.forward(id: targetEmail.id, messageForwardOptions: MessageForwardOptions(to: "anything@\(EmailsTestsSetup.verifiedDomain ?? "")", text: body)) XCTAssertFalse(message.id.isEmpty) @@ -250,7 +250,7 @@ final class EmailsTests: XCTestCase { let body = "Forwarded HTML message.
" let targetEmail = EmailsTestsSetup.emails[0] - let message = try await EmailsTestsSetup.client.messages.forward(id: targetEmail.id, messageForwardOptions: MessageForwardOptions(to: "anything@\(EmailsTestsSetup.verifiedDomain)", + let message = try await EmailsTestsSetup.client.messages.forward(id: targetEmail.id, messageForwardOptions: MessageForwardOptions(to: "anything@\(EmailsTestsSetup.verifiedDomain ?? "")", html: body)) XCTAssertFalse(message.id.isEmpty)