homebox/backend/app/api/v1/controller_test.go

19 lines
344 B
Go
Raw Normal View History

2022-08-30 02:30:36 +00:00
package v1
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_NewHandlerV1(t *testing.T) {
v1Base := BaseUrlFunc("/testing/v1")
2022-09-03 18:38:35 +00:00
ctrl := NewControllerV1(mockHandler.svc)
2022-08-30 02:30:36 +00:00
assert.NotNil(t, ctrl)
assert.Equal(t, "/testing/v1/v1/abc123", v1Base("/abc123"))
assert.Equal(t, "/testing/v1/v1/abc123", v1Base("/abc123"))
}