(t *testing.T)
| 211 | } |
| 212 | |
| 213 | func TestLuaContextSendFailed(t *testing.T) { |
| 214 | l := lua.NewState() |
| 215 | defer l.Close() |
| 216 | w := httptest.NewRecorder() |
| 217 | ctx, _ := gin.CreateTestContext(w) |
| 218 | ctx.Set(gin.BodyBytesKey, []byte("{}")) |
| 219 | initHttpLua(l, ctx) |
| 220 | if err := l.DoString(`ctx:send({})`); err != nil { |
| 221 | t.Fatal(err) |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | func TestLuaSendContext(t *testing.T) { |
| 226 | ctx := &luaSendContext{} |
nothing calls this directly
no test coverage detected