| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package e2e |
||
| 2 | |||
| 3 | import ( |
||
| 4 | "context" |
||
| 5 | "net/http" |
||
| 6 | "testing" |
||
| 7 | |||
| 8 | "github.com/stretchr/testify/assert" |
||
| 9 | ) |
||
| 10 | |||
| 11 | func TestDiscountRedemptionService_Get(t *testing.T) { |
||
| 12 | // Setup |
||
| 13 | t.Parallel() |
||
| 14 | |||
| 15 | _, response, err := client.DiscountRedemptions.Get(context.Background(), "9959") |
||
| 16 | |||
| 17 | // Assert |
||
| 18 | assert.NotNil(t, err) |
||
| 19 | |||
| 20 | assert.Equal(t, http.StatusNotFound, response.HTTPResponse.StatusCode) |
||
| 21 | } |
||
| 22 | |||
| 23 | func TestDiscountRedemptionsService_List(t *testing.T) { |
||
| 24 | // Setup |
||
| 25 | t.Parallel() |
||
| 26 | |||
| 27 | redemptions, response, err := client.DiscountRedemptions.List(context.Background()) |
||
| 28 | |||
| 29 | // Assert |
||
| 30 | assert.Nil(t, err) |
||
| 31 | |||
| 32 | assert.Equal(t, http.StatusOK, response.HTTPResponse.StatusCode) |
||
| 33 | assert.Equal(t, 0, len(redemptions.Data)) |
||
| 34 | } |
||
| 35 |