generated from bitwarden/template
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into brant/authenticator-sync-integration-test
- Loading branch information
Showing
104 changed files
with
1,228 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
iPhone 15 Pro | ||
iPhone 16 Pro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
18.0 | ||
18.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
15.4 | ||
16.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
BitwardenShared/Core/Platform/Services/NotificationCenterServiceTests.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import XCTest | ||
|
||
@testable import BitwardenShared | ||
|
||
final class NotificationCenterServiceTests: BitwardenTestCase { | ||
// MARK: Properties | ||
|
||
var notificationCenter: NotificationCenter! | ||
var subject: DefaultNotificationCenterService! | ||
|
||
// MARK: Setup & Teardown | ||
|
||
override func setUp() { | ||
notificationCenter = NotificationCenter() | ||
subject = DefaultNotificationCenterService(notificationCenter: notificationCenter) | ||
} | ||
|
||
override func tearDown() { | ||
notificationCenter = nil | ||
subject = nil | ||
} | ||
|
||
// MARK: Tests | ||
|
||
/// `didEnterBackgroundPublisher` publishes a notification when the app enters the background. | ||
func testDidEnterBackgroundPublisher() async throws { | ||
var iterator = subject.didEnterBackgroundPublisher().makeAsyncIterator() | ||
Task { | ||
notificationCenter.post( | ||
name: UIApplication.didEnterBackgroundNotification, | ||
object: nil | ||
) | ||
} | ||
let result: Void? = await iterator.next() | ||
|
||
XCTAssertNotNil(result) | ||
} | ||
|
||
/// `willEnterForegroundPublisher` publishes a notification when the app will enter the foreground. | ||
func testWillEnterForegroundPublisher() async throws { | ||
var iterator = subject.willEnterForegroundPublisher().makeAsyncIterator() | ||
Task { | ||
notificationCenter.post( | ||
name: UIApplication.willEnterForegroundNotification, | ||
object: nil | ||
) | ||
} | ||
let result: Void? = await iterator.next() | ||
|
||
XCTAssertNotNil(result) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.