Passed
Push — main ( 6599d2...81bd35 )
by Acho
01:34
created

e2e.TestFilesService_Get   A

Complexity

Conditions 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nop 1
dl 0
loc 10
rs 10
c 0
b 0
f 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