fix: suppress remaining errcheck failures in test and oauth code
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Fix two more json.NewEncoder(w).Encode() calls in oauth_test.go (lines 53 and 119) that were missed in the previous pass. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
6d3c9c071f
commit
7714013e48
@ -50,7 +50,7 @@ func TestHandleCallback_Success(t *testing.T) {
|
||||
// Mock GHL token endpoint
|
||||
tokenSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
json.NewEncoder(w).Encode(TokenResponse{
|
||||
_ = json.NewEncoder(w).Encode(TokenResponse{
|
||||
AccessToken: "access_tok",
|
||||
RefreshToken: "refresh_tok",
|
||||
ExpiresIn: 86400,
|
||||
@ -116,7 +116,7 @@ func TestGetValidToken_Expired_RefreshesAutomatically(t *testing.T) {
|
||||
t.Errorf("expected refresh_token grant, got %s", r.FormValue("grant_type"))
|
||||
}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
json.NewEncoder(w).Encode(TokenResponse{
|
||||
_ = json.NewEncoder(w).Encode(TokenResponse{
|
||||
AccessToken: "new_access_token",
|
||||
RefreshToken: "new_refresh_token",
|
||||
ExpiresIn: 3600,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user