mirror of
https://github.com/simon987/ws_bucket.git
synced 2025-04-10 14:06:46 +00:00
25 lines
387 B
Go
25 lines
387 B
Go
package test
|
|
|
|
import (
|
|
"github.com/simon987/ws_bucket/api"
|
|
"testing"
|
|
)
|
|
|
|
func TestCreateClient(t *testing.T) {
|
|
|
|
r := createClient(api.CreateClientRequest{
|
|
Alias: "testcreateclient",
|
|
})
|
|
|
|
if r.Ok != true {
|
|
t.Error()
|
|
}
|
|
}
|
|
|
|
func createClient(request api.CreateClientRequest) (ar *api.CreateClientResponse) {
|
|
|
|
resp := Post("/client", request)
|
|
UnmarshalResponse(resp, &ar)
|
|
return
|
|
}
|