chore: fix lint issues

This commit is contained in:
Felipe M 2025-08-06 18:25:25 +02:00
parent 17ea21a579
commit 7c37953c28
No known key found for this signature in database
GPG key ID: 52E5D65FCF99808A
20 changed files with 136 additions and 131 deletions

View file

@ -10,20 +10,20 @@ import (
)
func TestServeHTTP(t *testing.T) {
assert := assert.New(t)
a := assert.New(t)
plugin := Plugin{}
w := httptest.NewRecorder()
r := httptest.NewRequest(http.MethodGet, "/api/v1/hello", nil)
r := httptest.NewRequest(http.MethodGet, "/api/v1/hello", http.NoBody)
r.Header.Set("Mattermost-User-ID", "test-user-id")
plugin.ServeHTTP(nil, w, r)
result := w.Result()
assert.NotNil(result)
a.NotNil(result)
defer result.Body.Close()
bodyBytes, err := io.ReadAll(result.Body)
assert.Nil(err)
a.Nil(err)
bodyString := string(bodyBytes)
assert.Equal("Hello, world!", bodyString)
a.Equal("Hello, world!", bodyString)
}