deposit.feature 1.2 KB

123456789101112131415161718192021222324252627282930
  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. Then @account1 has no balance
  8. Given update @tx1 set status to settled
  9. Then @account1 has balance of 10000 USD/2
  10. Scenario: User deposit funds and it fails
  11. Given a pending deposit @tx1 of 10000 USD/2 for @account1
  12. And update @tx1 set status to failed
  13. Then @account1 has no balance
  14. Scenario: User deposit funds and it confirms, then it reverts with a negative deposit
  15. Given a pending deposit @tx1 of 10000 USD/2 for @account1
  16. And update @tx1 set status to settled
  17. Then @account1 has balance of 10000 USD/2
  18. Given a settled deposit @tx2 of -10000 USD/2 for @account1
  19. Then @account1 has no balance
  20. Scenario: Negative deposit affects balance
  21. Given a pending deposit @tx1 of 1000 USD/2 for @account1
  22. And update @tx1 set status to settled
  23. Then @account1 has balance of 1000 USD/2
  24. Given a settled deposit @tx2 of -10000 USD/2 for @account1
  25. Then @account1 has balance of -9000 USD/2