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

e2e.TestStoreService_Get   A

Complexity

Conditions 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nop 1
dl 0
loc 11
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 TestStoreService_Get(t *testing.T) {
12
	// Setup
13
	t.Parallel()
14
15
	store, response, err := client.Stores.Get(context.Background(), "11559")
16
17
	// Assert
18
	assert.Nil(t, err)
19
20
	assert.Equal(t, http.StatusOK, response.HTTPResponse.StatusCode)
21
	assert.Equal(t, "11559", store.Data.ID)
22
}
23
24
func TestStoresService_List(t *testing.T) {
25
	// Setup
26
	t.Parallel()
27
28
	stores, response, err := client.Stores.List(context.Background())
29
30
	// Assert
31
	assert.Nil(t, err)
32
33
	assert.Equal(t, http.StatusOK, response.HTTPResponse.StatusCode)
34
	assert.Equal(t, 2, len(stores.Data))
35
}
36