mirror of
https://github.com/pushbits/server.git
synced 2025-07-08 12:17:34 +02:00
Update to Go 1.19
This commit is contained in:
parent
21a4d156e1
commit
2ddc0fbd74
12 changed files with 85 additions and 43 deletions
|
@ -2,7 +2,7 @@ package api
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
@ -44,7 +44,7 @@ func TestApi_CreateNotification(t *testing.T) {
|
|||
|
||||
// Parse body only for successful requests
|
||||
if req.ShouldStatus >= 200 && req.ShouldStatus < 300 {
|
||||
body, err := ioutil.ReadAll(w.Body)
|
||||
body, err := io.ReadAll(w.Body)
|
||||
require.NoErrorf(err, "Can not read request body")
|
||||
err = json.Unmarshal(body, ¬ification)
|
||||
require.NoErrorf(err, "Can not unmarshal request body")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue