forked from Mirrors/oauth2
google: add ExchangeToken unit tests
This commit is contained in:
parent
13049afc57
commit
ed1c7b8858
|
@ -78,3 +78,11 @@ func TestExchangeToken(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestExchangeToken_Err(t *testing.T) {
|
||||||
|
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
w.Write([]byte("what's wrong with this response?"))
|
||||||
|
}))
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue