(t *testing.T)
| 801 | } |
| 802 | |
| 803 | func TestContextDefaultQueryOnEmptyRequest(t *testing.T) { |
| 804 | c, _ := CreateTestContext(httptest.NewRecorder()) // here c.Request == nil |
| 805 | assert.NotPanics(t, func() { |
| 806 | value, ok := c.GetQuery("NoKey") |
| 807 | assert.False(t, ok) |
| 808 | assert.Empty(t, value) |
| 809 | }) |
| 810 | assert.NotPanics(t, func() { |
| 811 | assert.Equal(t, "nada", c.DefaultQuery("NoKey", "nada")) |
| 812 | }) |
| 813 | assert.NotPanics(t, func() { |
| 814 | assert.Empty(t, c.Query("NoKey")) |
| 815 | }) |
| 816 | } |
| 817 | |
| 818 | func TestContextQueryAndPostForm(t *testing.T) { |
| 819 | c, _ := CreateTestContext(httptest.NewRecorder()) |
nothing calls this directly
no test coverage detected