Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@
<Test
Identifier = "SentryStacktraceBuilderTests/testAsyncStacktraces_disabled()">
</Test>
<Test
Identifier = "SentrySystemEventBreadcrumbsTest/testTimezoneChangeNotificationBreadcrumb_disabled()">
</Test>
</SkippedTests>
</TestableReference>
</Testables>
Expand Down
1 change: 1 addition & 0 deletions Sources/Sentry/include/SentrySystemEventBreadcrumbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ SENTRY_NO_INIT

#if TARGET_OS_IOS
- (void)start:(UIDevice *)currentDevice;
- (void)timezoneEventTriggered;
#endif

- (void)stop;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,14 @@ class SentrySystemEventBreadcrumbsTest: XCTestCase {
}
}

func testTimezoneChangeNotificationBreadcrumb_disabled() {
func testTimezoneChangeNotificationBreadcrumb() {
let scope = Scope()
sut = fixture.getSut(scope: scope, currentDevice: nil)

fixture.currentDateProvider.timezoneOffsetValue = 7_200

NotificationCenter.default.post(Notification(name: NSNotification.Name.NSSystemTimeZoneDidChange))
sut.timezoneEventTriggered()

assertBreadcrumbAction(scope: scope, action: "TIMEZONE_CHANGE") { data in
XCTAssertEqual(data["previous_seconds_from_gmt"] as? Int, 0)
XCTAssertEqual(data["current_seconds_from_gmt"] as? Int, 7_200)
Expand Down