From 3b59a65fb0c8d437f7d77dec2697ebfcbd5dfce8 Mon Sep 17 00:00:00 2001 From: albertopeam Date: Wed, 4 Jan 2023 23:07:22 +0100 Subject: [PATCH] added assertions to ENSTests --- Tests/web3swiftTests/remoteTests/ENSTests.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/web3swiftTests/remoteTests/ENSTests.swift b/Tests/web3swiftTests/remoteTests/ENSTests.swift index df9276136..052142bd9 100755 --- a/Tests/web3swiftTests/remoteTests/ENSTests.swift +++ b/Tests/web3swiftTests/remoteTests/ENSTests.swift @@ -12,8 +12,8 @@ import Web3Core class ENSTests: XCTestCase { func testDomainNormalization() throws { - let normalizedString = NameHash.normalizeDomainName("example.ens") - + let normalizedString = NameHash.normalizeDomainName("Example.ENS") + XCTAssertEqual(normalizedString, "example.ens") } func testNameHash() throws { @@ -79,10 +79,10 @@ class ENSTests: XCTestCase { func testTTL() async throws { let web3 = await Web3.InfuraMainnetWeb3(accessToken: Constants.infuraToken) - let ens = ENS(web3: web3) + let ens = try XCTUnwrap(ENS(web3: web3)) let domain = "somename.eth" - let ttl = try await ens?.registry.getTTL(node: domain) - + let ttl = try await ens.registry.getTTL(node: domain) + XCTAssertGreaterThanOrEqual(ttl, 0) } func testGetAddress() async throws {