Skip to content

Commit aca53e5

Browse files
Merge pull request #722 from albertopeam/feature/ENSTests-warnings
ENSTests added assertions
2 parents ee26d1e + 3b59a65 commit aca53e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tests/web3swiftTests/remoteTests/ENSTests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import Web3Core
1212
class ENSTests: XCTestCase {
1313

1414
func testDomainNormalization() throws {
15-
let normalizedString = NameHash.normalizeDomainName("example.ens")
16-
15+
let normalizedString = NameHash.normalizeDomainName("Example.ENS")
16+
XCTAssertEqual(normalizedString, "example.ens")
1717
}
1818

1919
func testNameHash() throws {
@@ -79,10 +79,10 @@ class ENSTests: XCTestCase {
7979

8080
func testTTL() async throws {
8181
let web3 = await Web3.InfuraMainnetWeb3(accessToken: Constants.infuraToken)
82-
let ens = ENS(web3: web3)
82+
let ens = try XCTUnwrap(ENS(web3: web3))
8383
let domain = "somename.eth"
84-
let ttl = try await ens?.registry.getTTL(node: domain)
85-
84+
let ttl = try await ens.registry.getTTL(node: domain)
85+
XCTAssertGreaterThanOrEqual(ttl, 0)
8686
}
8787

8888
func testGetAddress() async throws {

0 commit comments

Comments
 (0)