Skip to content

Commit bd2188a

Browse files
chore: removed commented out case from SecurityToken test
1 parent e2b0f5d commit bd2188a

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

Tests/web3swiftTests/localTests/ST20AndSecurityTokenTests.swift

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,29 +92,21 @@ class ST20AndSecurityTokenTests: XCTestCase {
9292

9393
func testSecurityTokenInvestors() async throws {
9494
let expectedNumberOfInvestors = BigUInt.randomInteger(lessThan: BigUInt(10000000000))
95-
// let expectedInvestors = [EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")!,EthereumAddress("0x2dD33957C90880bE4Ee9fd5F703110BDA2E579EC")!]
96-
9795
ethMock.onCallTransaction = { transaction in
9896
guard let function = self.securityToken.contract.contract.getFunctionCalled(transaction.data) else {
9997
XCTFail("Failed to decode function call to determine what shall be returned")
10098
return Data()
10199
}
102-
switch function.name {
103-
case "investorCount":
100+
if function.name == "investorCount" {
104101
return ABIEncoder.encode(types: [.uint(bits: 256)], values: [expectedNumberOfInvestors] as [AnyObject])!
105-
// case "investors":
106-
// return ABIEncoder.encode(types: [.array(type: .address, length: 0)],
107-
// values: [expectedInvestors] as [AnyObject])!
108-
default:
109-
// Unexpected function called
110-
XCTFail("Called function '\(String(describing: function.name))' which wasn't supposed to be called.")
111-
return Data()
112102
}
103+
// Unexpected function called
104+
XCTFail("Called function '\(String(describing: function.name))' which wasn't supposed to be called.")
105+
return Data()
113106
}
114107

115108
let investorsCount = try await securityToken.investorCount()
116109
XCTAssertEqual(investorsCount, expectedNumberOfInvestors)
117-
// XCTAssertEqual(investors, expectedInvestors)
118110
}
119111

120112
func testSecurityTokenGranularity() async throws {

0 commit comments

Comments
 (0)