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 matt/BIT-1212-refactor-vault-group
- Loading branch information
Showing
57 changed files
with
675 additions
and
98 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1224,4 +1224,49 @@ class StateServiceTests: BitwardenTestCase { // swiftlint:disable:this type_body | |
|
||
XCTAssertEqual(publishedValues, [true, false]) | ||
} | ||
|
||
/// `updateProfile(from:userId:)` updates the user's profile from the profile response. | ||
func test_updateProfile() async throws { | ||
await subject.addAccount( | ||
.fixture( | ||
profile: .fixture( | ||
avatarColor: nil, | ||
email: "[email protected]", | ||
emailVerified: false, | ||
hasPremiumPersonally: false, | ||
name: "User", | ||
stamp: "stamp", | ||
userId: "1" | ||
) | ||
) | ||
) | ||
|
||
await subject.updateProfile( | ||
from: .fixture( | ||
avatarColor: "175DDC", | ||
email: "[email protected]", | ||
emailVerified: true, | ||
name: "Other", | ||
premium: true, | ||
securityStamp: "new stamp" | ||
), | ||
userId: "1" | ||
) | ||
|
||
let updatedAccount = try await subject.getActiveAccount() | ||
XCTAssertEqual( | ||
updatedAccount, | ||
.fixture( | ||
profile: .fixture( | ||
avatarColor: "175DDC", | ||
email: "[email protected]", | ||
emailVerified: true, | ||
hasPremiumPersonally: true, | ||
name: "Other", | ||
stamp: "new stamp", | ||
userId: "1" | ||
) | ||
) | ||
) | ||
} | ||
} // swiftlint:disable:this file_length |
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
Oops, something went wrong.