-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path5_refund_captured.feature
41 lines (36 loc) · 2.12 KB
/
5_refund_captured.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
37
38
39
40
41
Feature: Refund captured
Scenario: Refund whole captured when credit card provider will approve refund
Given I am a merchant with id "49ce95dc-bb15-4c45-9df4-7b8c0a9f8896" authorized to "0" GBP and "100" GBP captured
And credit card provider will approve refund
When I refund "100" GBP from my captured
Then I should be notified that captured was refunded
And I should be authorized to "0" GBP
And I should have captured "0" GBP
Scenario: Refund partial captured when credit card provider will approve refund
Given I am a merchant with id "49ce95dc-bb15-4c45-9df4-7b8c0a9f8896" authorized to "10" GBP and "100" GBP captured
And credit card provider will approve refund
When I refund "50" GBP from my captured
Then I should be notified that captured was refunded
And I should be authorized to "10" GBP
And I should have captured "50" GBP
Scenario: Refund captured with negative amount
Given I am a merchant with id "49ce95dc-bb15-4c45-9df4-7b8c0a9f8896" authorized to "10" GBP and "100" GBP captured
And credit card provider will approve refund
When I refund "-50" GBP from my captured
Then I should be notified that I cannot use negative amount
And I should not be notified that captured was refunded
And I should be authorized to "10" GBP
And I should have captured "100" GBP
Scenario: Refund authorization when credit card provider will decline refund
Given I am a merchant with id "49ce95dc-bb15-4c45-9df4-7b8c0a9f8896" authorized to "0" GBP and "100" GBP captured
And credit card provider will decline refund
When I refund "100" GBP from my captured
Then I should be notified that refund was declined
And I should not be notified that captured was refunded
And I should be authorized to "0" GBP
And I should have captured "100" GBP
Scenario: Refund authorization as not existing merchant
Given credit card provider will approve refund
When I refund "100" GBP from my captured
Then I should not be notified that merchant does not exist
And I should not be notified that captured was refunded