forked from Mirrors/oauth2
google: add ExchangeToken unit tests
This commit is contained in:
parent
520fe129d2
commit
5688b03dbc
|
@ -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