(t *testing.T)
| 164 | } |
| 165 | |
| 166 | func TestLuaCheckHttpBody(t *testing.T) { |
| 167 | l := lua.NewState() |
| 168 | defer l.Close() |
| 169 | w := httptest.NewRecorder() |
| 170 | ctx, _ := gin.CreateTestContext(w) |
| 171 | ctx.Set(gin.BodyBytesKey, []byte("{}")) |
| 172 | initHttpLua(l, ctx) |
| 173 | if err := l.DoString(`ctx:request():body()`); err != nil { |
| 174 | t.Fatal(err) |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | func TestLuaContextSend(t *testing.T) { |
| 179 | c := New() |
nothing calls this directly
no test coverage detected