aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contract-wrappers/test
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-06-29 20:44:12 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-06-29 22:52:54 +0800
commit6db614251e4d1ec7248fd87354bfde8e65d50374 (patch)
treee78f6d145ed0c8bd4c7c3f2da2da5fd84b6f0c87 /packages/contract-wrappers/test
parentbcc588efe726751c100f020a219b79d8f2a31f03 (diff)
downloaddexon-sol-tools-6db614251e4d1ec7248fd87354bfde8e65d50374.tar
dexon-sol-tools-6db614251e4d1ec7248fd87354bfde8e65d50374.tar.gz
dexon-sol-tools-6db614251e4d1ec7248fd87354bfde8e65d50374.tar.bz2
dexon-sol-tools-6db614251e4d1ec7248fd87354bfde8e65d50374.tar.lz
dexon-sol-tools-6db614251e4d1ec7248fd87354bfde8e65d50374.tar.xz
dexon-sol-tools-6db614251e4d1ec7248fd87354bfde8e65d50374.tar.zst
dexon-sol-tools-6db614251e4d1ec7248fd87354bfde8e65d50374.zip
Rename getApprovedAsync to getApprovedIfExistsAsync
Diffstat (limited to 'packages/contract-wrappers/test')
-rw-r--r--packages/contract-wrappers/test/erc721_wrapper_test.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/contract-wrappers/test/erc721_wrapper_test.ts b/packages/contract-wrappers/test/erc721_wrapper_test.ts
index 170442690..9687af531 100644
--- a/packages/contract-wrappers/test/erc721_wrapper_test.ts
+++ b/packages/contract-wrappers/test/erc721_wrapper_test.ts
@@ -211,14 +211,17 @@ describe('ERC721Wrapper', () => {
expect(isApprovedForAll).to.be.true();
});
});
- describe('#setApprovalAsync/getApprovedAsync', () => {
+ describe('#setApprovalAsync/getApprovedIfExistsAsync', () => {
it("should set the spender's approval", async () => {
const tokenId = await tokenUtils.mintDummyERC721Async(tokenAddress, ownerAddress);
- const approvalBeforeSet = await contractWrappers.erc721Token.getApprovedAsync(tokenAddress, tokenId);
+ const approvalBeforeSet = await contractWrappers.erc721Token.getApprovedIfExistsAsync(
+ tokenAddress,
+ tokenId,
+ );
expect(approvalBeforeSet).to.be.undefined();
await contractWrappers.erc721Token.setApprovalAsync(tokenAddress, approvedAddress, tokenId);
- const approvalAfterSet = await contractWrappers.erc721Token.getApprovedAsync(tokenAddress, tokenId);
+ const approvalAfterSet = await contractWrappers.erc721Token.getApprovedIfExistsAsync(tokenAddress, tokenId);
expect(approvalAfterSet).to.be.equal(approvedAddress);
});
});