Remove deprecated nrelay uses from tests
Changelog-None Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@@ -89,16 +89,6 @@ class Bech32ObjectTests: XCTestCase {
|
|||||||
XCTAssertEqual(expectedObject, actualObject)
|
XCTAssertEqual(expectedObject, actualObject)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testTLVParsing_NRelayExample_ValidContent() throws {
|
|
||||||
let content = "nrelay1qqt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueq4r295t"
|
|
||||||
let relay = "wss://relay.nostr.band"
|
|
||||||
|
|
||||||
let expectedObject = Bech32Object.nrelay(relay)
|
|
||||||
let actualObject = Bech32Object.parse(content)
|
|
||||||
|
|
||||||
XCTAssertEqual(expectedObject, actualObject)
|
|
||||||
}
|
|
||||||
|
|
||||||
func testTLVParsing_NaddrExample_ValidContent() throws {
|
func testTLVParsing_NaddrExample_ValidContent() throws {
|
||||||
let content = "naddr1qqxnzdesxqmnxvpexqunzvpcqyt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueqzypve7elhmamff3sr5mgxxms4a0rppkmhmn7504h96pfcdkpplvl2jqcyqqq823cnmhuld"
|
let content = "naddr1qqxnzdesxqmnxvpexqunzvpcqyt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueqzypve7elhmamff3sr5mgxxms4a0rppkmhmn7504h96pfcdkpplvl2jqcyqqq823cnmhuld"
|
||||||
|
|
||||||
|
|||||||
@@ -409,20 +409,6 @@ class NoteContentViewTests: XCTestCase {
|
|||||||
assertCompatibleTextHasExpectedString(compatibleText: compatibleText, expected: bech)
|
assertCompatibleTextHasExpectedString(compatibleText: compatibleText, expected: bech)
|
||||||
}
|
}
|
||||||
|
|
||||||
func testMentionStr_Nrelay_ContainsAbbreviated() {
|
|
||||||
let bech = "nrelay1qqt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueq4r295t"
|
|
||||||
let compatibleText = createCompatibleText(bech)
|
|
||||||
|
|
||||||
assertCompatibleTextHasExpectedString(compatibleText: compatibleText, expected: "wss://relay.nostr.band")
|
|
||||||
}
|
|
||||||
|
|
||||||
func testMentionStr_Nrelay_ContainsFullBech32() {
|
|
||||||
let bech = "nrelay1qqt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueq4r295t"
|
|
||||||
let compatibleText = createCompatibleText(bech)
|
|
||||||
|
|
||||||
assertCompatibleTextHasExpectedString(compatibleText: compatibleText, expected: bech)
|
|
||||||
}
|
|
||||||
|
|
||||||
func testMentionStr_Naddr_ContainsAbbreviated() {
|
func testMentionStr_Naddr_ContainsAbbreviated() {
|
||||||
let bech = "naddr1qqxnzdesxqmnxvpexqunzvpcqyt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueqzypve7elhmamff3sr5mgxxms4a0rppkmhmn7504h96pfcdkpplvl2jqcyqqq823cnmhuld"
|
let bech = "naddr1qqxnzdesxqmnxvpexqunzvpcqyt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueqzypve7elhmamff3sr5mgxxms4a0rppkmhmn7504h96pfcdkpplvl2jqcyqqq823cnmhuld"
|
||||||
let compatibleText = createCompatibleText(bech)
|
let compatibleText = createCompatibleText(bech)
|
||||||
|
|||||||
@@ -249,14 +249,6 @@ class damusTests: XCTestCase {
|
|||||||
XCTAssertEqual(ev.tags[0][1].string(), "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d")
|
XCTAssertEqual(ev.tags[0][1].string(), "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testTagGeneration_Nrelay_ContainsRTag() {
|
|
||||||
let ev = createEventFromContentString("nrelay1qqt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueq4r295t")
|
|
||||||
|
|
||||||
XCTAssertEqual(ev.tags.count, 1)
|
|
||||||
XCTAssertEqual(ev.tags[0][0].string(), "r")
|
|
||||||
XCTAssertEqual(ev.tags[0][1].string(), "wss://relay.nostr.band")
|
|
||||||
}
|
|
||||||
|
|
||||||
func testTagGeneration_Naddr_ContainsATag(){
|
func testTagGeneration_Naddr_ContainsATag(){
|
||||||
let ev = createEventFromContentString("naddr1qqxnzdesxqmnxvpexqunzvpcqyt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueqzypve7elhmamff3sr5mgxxms4a0rppkmhmn7504h96pfcdkpplvl2jqcyqqq823cnmhuld")
|
let ev = createEventFromContentString("naddr1qqxnzdesxqmnxvpexqunzvpcqyt8wumn8ghj7un9d3shjtnwdaehgu3wvfskueqzypve7elhmamff3sr5mgxxms4a0rppkmhmn7504h96pfcdkpplvl2jqcyqqq823cnmhuld")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user