Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test multiple Swaps for a single buyer #2

Open
lukem512 opened this issue Dec 30, 2017 · 0 comments
Open

Test multiple Swaps for a single buyer #2

lukem512 opened this issue Dec 30, 2017 · 0 comments

Comments

@lukem512
Copy link
Owner

This has been prevented with #8a7fc554056928b7ce6b97cca529278763b110fc but there is not yet a test in place. The following code requires modification to check for the a failed require, which will eventually map to a REVERT opcode.

it("user cannot create a second Swap whilst one exists", function() {
    return ts.create(token.address, amount, price, seller, buyer, {from: buyer})
    .then(function() {
      return ts.create(token.address, amount, price, seller, buyer, {from: buyer})
    }).then(function() {
      // TODO: check for REVERT
    })
  });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant