Skip to content

Fix unittest that does not pass#16

Open
samraul wants to merge 1 commit intoudacity:mainfrom
samraul:patch-3
Open

Fix unittest that does not pass#16
samraul wants to merge 1 commit intoudacity:mainfrom
samraul:patch-3

Conversation

@samraul
Copy link
Contributor

@samraul samraul commented Feb 9, 2022

  • A gasPrice of 0 can't be set with the current version of the libraries
  • Gas fee needs to be accounted for
  • Flag the fact that the default account balances are too big for JS to properly compute the balance changes
  ✓ can Create a Star (49ms)
  ✓ lets user1 put up their star for sale (53ms)
  ✓ lets user1 get the funds after the sale (100ms)
  ✓ lets user2 buy a star, if it is put up for sale (113ms)
  ✓ lets user2 buy a star and decreases its balance in ether (88ms)
  ✓ can add the star name and star symbol properly
  ✓ lets 2 users exchange stars (126ms)
  ✓ lets a user transfer a star (73ms)
  ✓ lookUptokenIdToStarInfo test (41ms)

  9 passing (668ms)

- A gasPrice of 0 can't be set with the current version of the libraries
- Gas fee needs to be accounted for
- Flag the fact that the default account balances are too big for JS to properly compute the balance changes
@samraul samraul requested a review from a team as a code owner February 9, 2022 09:01
@samraul samraul requested review from SudKul and removed request for a team February 9, 2022 09:01
@@ -65,12 +65,26 @@ it('lets user2 buy a star and decreases its balance in ether', async() => {
let balance = web3.utils.toWei(".05", "ether");
await instance.createStar('awesome star', starId, {from: user1});
await instance.putStarUpForSale(starId, starPrice, {from: user1});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would need to add approve here for later version of solidity.

    await instance.approve(user2, starId, {from: user1});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants