| Conditions | 1 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package flutterwave |
||
| 34 | func TestTransactionsService_RefundWithError(t *testing.T) { |
||
| 35 | // Setup |
||
| 36 | t.Parallel() |
||
| 37 | |||
| 38 | // Arrange |
||
| 39 | server := helpers.MakeTestServer(http.StatusInternalServerError, "") |
||
| 40 | client := New(WithBaseURL(server.URL)) |
||
| 41 | |||
| 42 | // Act |
||
| 43 | _, response, err := client.Transactions.Refund(context.Background(), 123, 200) |
||
| 44 | |||
| 45 | // Assert |
||
| 46 | assert.NotNil(t, err) |
||
| 47 | |||
| 48 | assert.Equal(t, http.StatusInternalServerError, response.HTTPResponse.StatusCode) |
||
| 49 | |||
| 50 | // Teardown |
||
| 51 | server.Close() |
||
| 52 | } |
||
| 53 |