hanayo/vendor/github.com/RangelReale/osin/client_test.go

19 lines
403 B
Go
Raw Normal View History

2019-02-23 13:29:15 +00:00
package osin
import (
"testing"
)
func TestClientIntfUserData(t *testing.T) {
c := &DefaultClient{
UserData: make(map[string]interface{}),
}
// check if the interface{} returned from the method is a reference
c.GetUserData().(map[string]interface{})["test"] = "none"
if _, ok := c.GetUserData().(map[string]interface{})["test"]; !ok {
t.Error("Returned interface is not a reference")
}
}