Merge pull request #1045 from DiptoChakrabarty/replaceioutil

Replace ioutil in testing of gchat
This commit is contained in:
Stefan Prodan
2021-11-09 19:22:30 +02:00
committed by GitHub
+2 -2
View File
@@ -18,7 +18,7 @@ package notifier
import (
"encoding/json"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"testing"
@@ -34,7 +34,7 @@ func TestGChat_Post(t *testing.T) {
}
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
b, err := ioutil.ReadAll(r.Body)
b, err := io.ReadAll(r.Body)
require.NoError(t, err)
var payload = GChatPayload{}