Skip to content

Commit

Permalink
One more test
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinrenskers committed Jul 6, 2022
1 parent 0996314 commit 2571228
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tests/SentryTests/Helper/SentryFileManager+TestProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ SentryFileManager (TestProperties)

@property (nonatomic, copy) NSString *envelopesPath;

@property (nonatomic, copy) NSString *timezoneOffsetFilePath;

@end

NS_ASSUME_NONNULL_END
5 changes: 5 additions & 0 deletions Tests/SentryTests/Helper/SentryFileManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,11 @@ class SentryFileManagerTests: XCTestCase {
XCTAssertNotNil(sut.readTimezoneOffset())
}

func testReadGarbageTimezoneOffset() throws {
try "garbage".write(to: URL(fileURLWithPath: sut.timezoneOffsetFilePath), atomically: true, encoding: .utf8)
XCTAssertNil(sut.readTimezoneOffset())
}

private func givenMaximumEnvelopes() {
fixture.eventIds.forEach { id in
let envelope = SentryEnvelope(id: id, singleItem: SentryEnvelopeItem(event: Event()))
Expand Down

0 comments on commit 2571228

Please sign in to comment.