-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path5_charge_funds.feature
36 lines (31 loc) · 2.54 KB
/
5_charge_funds.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Feature: Charge funds from a credit card
Scenario: Charge whole funds from a credit card
Given I have a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" with balance "50" GBP and available balance "0" GBP
When I charge "50" GBP from a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26"
Then I should be notified that funds were charged
And balance of a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" should be "0" GBP
And available balance of a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" should be "0" GBP
Scenario: Charge partial funds from a credit card
Given I have a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" with balance "100" GBP and available balance "50" GBP
When I charge "49" GBP from a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26"
Then I should be notified that funds were charged
And balance of a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" should be "51" GBP
And available balance of a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" should be "50" GBP
Scenario: Charge more funds than blocked
Given I have a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" with balance "100" GBP and available balance "50" GBP
When I charge "51" GBP from a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26"
Then I should be notified that I can not charge more funds than blocked
Then I should not be notified that funds were charged
And balance of a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" should be "100" GBP
And available balance of a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" should be "50" GBP
Scenario: Charge negative funds from a credit card
Given I have a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" with balance "50" GBP and available balance "0" GBP
When I charge "-50" GBP from a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26"
Then I should be notified that I can not use negative funds
And balance of a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" should be "50" GBP
And available balance of a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26" should be "0" GBP
Scenario: Charge funds from a not existing card
Given I don't have a credit card
When I charge "49" GBP from a credit card with id "e6eb2b4c-94ce-46eb-b01c-67ed491dad26"
Then I should be notified that credit card does not exist
And I should not be notified that funds were charged