Update gin_integration_test.go

squash you dang spaces!!!
This commit is contained in:
Ronald Petty 2020-04-27 11:05:55 -07:00 committed by GitHub
parent c0c030b741
commit b1d2093f55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,8 +151,8 @@ func TestUnixSocket(t *testing.T) {
defer os.Remove(unixTestSocket)
go func() {
router.GET("/example", func(c *Context) { c.String(http.StatusOK, "it worked") })
assert.NoError(t, router.RunUnix(unixTestSocket))
router.GET("/example", func(c *Context) { c.String(http.StatusOK, "it worked") })
assert.NoError(t, router.RunUnix(unixTestSocket))
}()
// have to wait for the goroutine to start and run the server
// otherwise the main thread will complete
@ -165,7 +165,7 @@ func TestUnixSocket(t *testing.T) {
scanner := bufio.NewScanner(c)
var response string
for scanner.Scan() {
response += scanner.Text()
response += scanner.Text()
}
assert.Contains(t, response, "HTTP/1.0 200", "should get a 200")
assert.Contains(t, response, "it worked", "resp body should match")