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 TestFilesService_Get(t *testing.T) { |
||
12 | // Setup |
||
13 | t.Parallel() |
||
14 | |||
15 | _, response, err := client.Files.Get(context.Background(), "36095") |
||
16 | |||
17 | // Assert |
||
18 | assert.NotNil(t, err) |
||
19 | |||
20 | assert.Equal(t, http.StatusNotFound, response.HTTPResponse.StatusCode) |
||
21 | } |
||
22 | |||
23 | func TestFilesService_List(t *testing.T) { |
||
24 | // Setup |
||
25 | t.Parallel() |
||
26 | |||
27 | variants, response, err := client.Files.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(variants.Data)) |
||
34 | } |
||
35 |