-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathclient_test.go
More file actions
41 lines (35 loc) · 987 Bytes
/
Copy pathclient_test.go
File metadata and controls
41 lines (35 loc) · 987 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package wechatwork_test
import (
. "github.com/onsi/ginkgo"
)
var _ = Describe("Client", func() {
// var req *resty.Request
// var u *url.URL
// var err error
// var resp *resty.Response
BeforeEach(func() {
// apiPath := "/cgi-bin/agent/get"
// qs := models.ReqAgentGet{
// AgentID: strconv.FormatInt(app.AgentID, 10),
// }
// req = app.NewRequest(apiPath, qs, true)
// fmt.Println(req.URL)
// u, err = url.Parse(req.URL)
// if err != nil {
// panic(err)
// }
// resp, err = req.Get(req.URL)
// if err != nil {
// panic(err)
// }
})
Context("should return resty.Request", func() {
// It("should has correct HostURL", func() {
// Expect(resp.Header().Get("HOST")).To(Equal("https://qyapi.weixin.qq.com"))
// })
// It("should has access_token in querystring and should not be empty string", func() {
// Expect(u.Query().Get("access_token")).NotTo(BeNil())
// Expect(u.Query().Get("access_token")).NotTo(Equal(""))
// })
})
})