Skip to content
Snippets Groups Projects

Oneshot accounts

Merged Pascal Engélibert requested to merge poc-oneshot-accounts into master
Compare and
12 files
+ 775
6
Compare changes
  • Side-by-side
  • Inline
Files
12
 
Feature: Oneshot account
 
 
Scenario: Simple oneshot consumption
 
When alice sends 8 ĞD to oneshot dave
 
Then alice should have 2 ĞD
 
Then dave should have oneshot 8 ĞD
 
When oneshot dave consumes into account bob
 
Then dave should have oneshot 0 ĞD
 
Then bob should have 18 ĞD
 
Then bob should have oneshot 0 ĞD
 
 
Scenario: Double oneshot consumption
 
When alice sends 8 ĞD to oneshot dave
 
Then alice should have 2 ĞD
 
Then dave should have oneshot 8 ĞD
 
When oneshot dave consumes 6 ĞD into account bob and the rest into oneshot charlie
 
Then dave should have oneshot 0 ĞD
 
Then bob should have 16 ĞD
 
Then bob should have oneshot 0 ĞD
 
Then charlie should have 10 ĞD
 
Then charlie should have oneshot 2 ĞD
Loading