Changed some test formatting.

Change-Id: Ia1f314ae5edd33bc91b5e950c6499c049219ee79
This commit is contained in:
Patrick Jones
2021-01-11 13:03:20 -08:00
parent 3bbb4361ee
commit 5e41ced9dd
2 changed files with 13 additions and 10 deletions

View File

@@ -43,15 +43,15 @@ func TestToken_Func(t *testing.T) {
targetServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if got, want := r.URL.String(), "/"; got != want {
t.Errorf("Unexpected request URL: got %v but want %v", got, want)
t.Errorf("URL.String(): got %v but want %v", got, want)
}
headerAuth := r.Header.Get("Authorization")
if got, want := headerAuth, "Basic cmJyZ25vZ25yaG9uZ28zYmk0Z2I5Z2hnOWc6bm90c29zZWNyZXQ="; got != want {
t.Errorf("Unexpected autohrization header: got %v but want %v", got, want)
t.Errorf("got %v but want %v", got, want)
}
headerContentType := r.Header.Get("Content-Type")
if got, want := headerContentType, "application/x-www-form-urlencoded"; got != want {
t.Errorf("Unexpected Content-Type header: got %v but want %v", got, want)
t.Errorf("got %v but want %v", got, want)
}
body, err := ioutil.ReadAll(r.Body)
if err != nil {