Passed
Push — main ( fec294...1af38c )
by Acho
01:36
created

e2e.TestLicenseKeyService_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 TestLicenseKeyService_Get(t *testing.T) {
12
	// Setup
13
	t.Parallel()
14
15
	_, response, err := client.LicenseKeys.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 TestLicenseKeysService_List(t *testing.T) {
24
	// Setup
25
	t.Parallel()
26
27
	licenseKeys, response, err := client.LicenseKeys.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(licenseKeys.Data))
34
}
35