| Conditions | 1 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package e2e |
||
| 14 | func TestBalanceService_Get(t *testing.T) { |
||
| 15 | // Arrange |
||
| 16 | request := &neero.CreatePaymentMethodRequestNeroMerchantDetails{ |
||
| 17 | MerchantKey: os.Getenv("NEERO_MERCHANT_KEY"), |
||
| 18 | StoreID: os.Getenv("NEERO_STORE_ID"), |
||
| 19 | BalanceID: os.Getenv("NEERO_BALANCE_ID"), |
||
| 20 | OperatorID: os.Getenv("NEERO_OPERATOR_ID"), |
||
| 21 | } |
||
| 22 | |||
| 23 | paymentMethod, _, _ := client.PaymentMethod.Create(context.Background(), request) |
||
| 24 | spew.Dump(paymentMethod.ID) |
||
| 25 | |||
| 26 | // Act |
||
| 27 | balance, response, err := client.Balance.Get(context.Background(), paymentMethod.ID) |
||
| 28 | |||
| 29 | // Assert |
||
| 30 | assert.Nil(t, err) |
||
| 31 | assert.Equal(t, http.StatusOK, response.HTTPResponse.StatusCode) |
||
| 32 | spew.Dump(balance) |
||
| 33 | } |
||
| 34 |