endpoints_config_test.go 330 B

1234567891011121314151617
  1. package endpoints
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/assert"
  5. )
  6. func Test_getEndpointConfigData(t *testing.T) {
  7. r := getEndpointConfigData()
  8. d, ok := r.(map[string]interface{})
  9. assert.True(t, ok)
  10. products := d["products"]
  11. p, ok := products.([]interface{})
  12. assert.True(t, ok)
  13. assert.Equal(t, 127, len(p))
  14. }