blob: 9770ed5d04c4d88d9d6b6a3384d9857910519c05 [file] [log] [blame]
package v2
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
}
}