Feature: Withdraw cash
Customers take money out of their accounts.
- Given the customer has an account
From the background: Background
- Given the customer has an account
- Given the balance is 100
- When the customer withdraws 40
banknote count 20 2 - Then the receipt says
Dispensed: 40
From the background: Background
- Given the customer has an account
- When the customer withdraws <amount>
- Then the balance is <balance>
| amount | balance |
|---|---|
| 10 | 90 |
| amount | balance |
|---|---|
| 90 | 10 |
- When the customer withdraws 10
- Then the balance is 90
- When the customer withdraws 90
- Then the balance is 10
- Given the daily limit is 500
From the background: Background
- Given the customer has an account
From the rule's background: Background
- Given the daily limit is 500
- When the customer withdraws 600
- Then the withdrawal is refused
From the background: Background
- Given the customer has an account
From the rule's background: Background
- Given the daily limit is 500
- When the customer withdraws 500
- Then the withdrawal is accepted