mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-06 19:43:25 +08:00
增加通过excel批量添加用户的功能,支持导入后自动发邮件
This commit is contained in:
@@ -2,7 +2,7 @@ package admin
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
@@ -15,7 +15,7 @@ func TestRespSucess(t *testing.T) {
|
||||
RespSucess(w, "data")
|
||||
// fmt.Println(w)
|
||||
assert.Equal(w.Code, 200)
|
||||
body, _ := ioutil.ReadAll(w.Body)
|
||||
body, _ := io.ReadAll(w.Body)
|
||||
res := Resp{}
|
||||
err := json.Unmarshal(body, &res)
|
||||
assert.Nil(err)
|
||||
@@ -30,7 +30,7 @@ func TestRespError(t *testing.T) {
|
||||
RespError(w, 10, "err-msg")
|
||||
// fmt.Println(w)
|
||||
assert.Equal(w.Code, 200)
|
||||
body, _ := ioutil.ReadAll(w.Body)
|
||||
body, _ := io.ReadAll(w.Body)
|
||||
res := Resp{}
|
||||
err := json.Unmarshal(body, &res)
|
||||
assert.Nil(err)
|
||||
|
Reference in New Issue
Block a user