-
-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,15 +29,15 @@ class SentryFeedbackTests: XCTestCase { | |
} | ||
|
||
func testSerializeWithAllFields() throws { | ||
let sut = SentryFeedback(message: "Test feedback message", name: "Test feedback provider", email: "[email protected]", screenshot: Data()) | ||
let sut = SentryFeedback(message: "Test feedback message", name: "Test feedback provider", email: "[email protected]", attachments: [Data()]) | ||
|
||
let serialization = sut.serialize() | ||
XCTAssertEqual(try XCTUnwrap(serialization["message"] as? String), "Test feedback message") | ||
XCTAssertEqual(try XCTUnwrap(serialization["name"] as? String), "Test feedback provider") | ||
XCTAssertEqual(try XCTUnwrap(serialization["contact_email"] as? String), "[email protected]") | ||
XCTAssertEqual(try XCTUnwrap(serialization["source"] as? String), "widget") | ||
Check failure on line 38 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift
|
||
|
||
let attachments = sut.attachments() | ||
let attachments = sut.attachmentsForEnvelope() | ||
XCTAssertEqual(attachments.count, 1) | ||
XCTAssertEqual(try XCTUnwrap(attachments.first).filename, "screenshot.png") | ||
XCTAssertEqual(try XCTUnwrap(attachments.first).contentType, "application/png") | ||
|
@@ -52,7 +52,7 @@ class SentryFeedbackTests: XCTestCase { | |
XCTAssertNil(serialization["contact_email"]) | ||
XCTAssertEqual(try XCTUnwrap(serialization["source"] as? String), "widget") | ||
Check failure on line 53 in Tests/SentryTests/Integrations/Feedback/SentryFeedbackTests.swift
|
||
|
||
let attachments = sut.attachments() | ||
let attachments = sut.attachmentsForEnvelope() | ||
XCTAssertEqual(attachments.count, 0) | ||
} | ||
|
||
|