Commit e08972d5 by Arve Knudsen Committed by GitHub

login/social: Simplify test (#26679)

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
parent 7a5464fe
...@@ -2,7 +2,6 @@ package social ...@@ -2,7 +2,6 @@ package social
import ( import (
"encoding/json" "encoding/json"
"io"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"time" "time"
...@@ -311,7 +310,7 @@ func TestUserInfoSearchesForEmailAndRole(t *testing.T) { ...@@ -311,7 +310,7 @@ func TestUserInfoSearchesForEmailAndRole(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK) w.WriteHeader(http.StatusOK)
w.Header().Set("Content-Type", "application/json") w.Header().Set("Content-Type", "application/json")
_, err = io.WriteString(w, string(response)) _, err = w.Write(response)
require.NoError(t, err) require.NoError(t, err)
})) }))
provider.apiUrl = ts.URL provider.apiUrl = ts.URL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment