blob: 872813f02247a55783be631061fbb32ee54cc600 [file] [log] [blame]
package identity
import (
"encoding/json"
"testing"
)
func TestAccessToken(t *testing.T) {
authResults := make(map[string]interface{})
err := json.Unmarshal([]byte(authResultsOK), &authResults)
if err != nil {
t.Error(err)
return
}
tok, err := GetToken(authResults)
if err != nil {
t.Error(err)
return
}
if tok.ID != "ab48a9efdfedb23ty3494" {
t.Errorf("Expected token \"ab48a9efdfedb23ty3494\"; got \"%s\" instead", tok.ID)
return
}
}