-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Parse display_name * Add Warning in Documentation for `display_name` Co-authored-by: Bryan Montz <[email protected]> --------- Co-authored-by: Bryan Montz <[email protected]>
- Loading branch information
1 parent
8d9c7ad
commit 797f285
Showing
3 changed files
with
10 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ final class EventCreatingTests: XCTestCase, EventCreating, EventVerifying, Fixtu | |
|
||
func testCreateSetMetadataEvent() throws { | ||
let meta = UserMetadata(name: "Nostr SDK Test", | ||
displayName: "Nostr SDK Display Name", | ||
about: "I'm a test account. I'm used to test the Nostr SDK for Apple platforms.", | ||
website: URL(string: "https://github.com/nostr-sdk/nostr-sdk-ios")!, | ||
nostrAddress: "[email protected]", | ||
|
@@ -22,6 +23,7 @@ final class EventCreatingTests: XCTestCase, EventCreating, EventVerifying, Fixtu | |
let event = try setMetadataEvent(withUserMetadata: meta, signedBy: Keypair.test) | ||
|
||
XCTAssertEqual(event.userMetadata?.name, "Nostr SDK Test") | ||
XCTAssertEqual(event.userMetadata?.displayName, "Nostr SDK Display Name") | ||
XCTAssertEqual(event.userMetadata?.about, "I'm a test account. I'm used to test the Nostr SDK for Apple platforms.") | ||
XCTAssertEqual(event.userMetadata?.website, URL(string: "https://github.com/nostr-sdk/nostr-sdk-ios")) | ||
XCTAssertEqual(event.userMetadata?.nostrAddress, "[email protected]") | ||
|
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 |
---|---|---|
|
@@ -24,6 +24,7 @@ final class EventDecodingTests: XCTestCase, FixtureLoading { | |
|
||
// access metadata properties from raw dictionary | ||
XCTAssertEqual(event.rawUserMetadata["name"] as? String, "cameri") | ||
XCTAssertEqual(event.rawUserMetadata["display_name"] as? String, "Cameri 🦦⚡️") | ||
XCTAssertEqual(event.rawUserMetadata["about"] as? String, "@HodlWithLedn. All opinions are my own.\nBitcoiner class of 2021. Core Nostr Developer. Author of Nostream. Professional Relay Operator.") | ||
XCTAssertEqual(event.rawUserMetadata["website"] as? String, "https://primal.net/cameri") | ||
XCTAssertEqual(event.rawUserMetadata["nip05"] as? String, "[email protected]") | ||
|