deposit.feature 1.2 KB

1234567891011121314151617181920212223242526272829
  1. Feature: Deposits
  2. Scenario: User has deposit funds and it does not show in balances
  3. Given a pending deposit @tx1 of 10000 USD/2 for @account1
  4. Then @account1 has no balance
  5. Scenario: User deposit funds and it confirms
  6. Given a pending deposit @tx1 of 10000 USD/2 for @account1
  7. And update @tx1 set status to settled
  8. Then @account1 has balance of 10000 USD/2
  9. Scenario: User deposit funds and it fails
  10. Given a pending deposit @tx1 of 10000 USD/2 for @account1
  11. And update @tx1 set status to failed
  12. Then @account1 has no balance
  13. Scenario: User deposit funds and it confirms, then it reverts with a negative deposit
  14. Given a pending deposit @tx1 of 10000 USD/2 for @account1
  15. And update @tx1 set status to settled
  16. Then @account1 has balance of 10000 USD/2
  17. Given a settled deposit @tx2 of -10000 USD/2 for @account1
  18. Then @account1 has no balance
  19. Scenario: Negative deposit affects balance
  20. Given a pending deposit @tx1 of 1000 USD/2 for @account1
  21. And update @tx1 set status to settled
  22. Then @account1 has balance of 1000 USD/2
  23. Given a settled deposit @tx2 of -10000 USD/2 for @account1
  24. Then @account1 has balance of -9000 USD/2