google: add ExchangeToken unit tests

This commit is contained in:
Patrick Jones 2020-10-29 12:28:45 -07:00
parent 520fe129d2
commit 5688b03dbc
1 changed files with 8 additions and 0 deletions

View File

@ -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?"))
}))
}