(t *testing.T)
| 1686 | } |
| 1687 | |
| 1688 | func TestUnacceptableParamNames(t *testing.T) { |
| 1689 | table := []struct { |
| 1690 | name string |
| 1691 | testVal string |
| 1692 | expectSuccess bool |
| 1693 | }{ |
| 1694 | // timeout is no longer "protected" |
| 1695 | {"timeout", "42", true}, |
| 1696 | } |
| 1697 | |
| 1698 | for _, item := range table { |
| 1699 | c := testRESTClient(t, nil) |
| 1700 | r := c.Get().setParam(item.name, item.testVal) |
| 1701 | if e, a := item.expectSuccess, r.err == nil; e != a { |
| 1702 | t.Errorf("expected %v, got %v (%v)", e, a, r.err) |
| 1703 | } |
| 1704 | } |
| 1705 | } |
| 1706 | |
| 1707 | func TestBody(t *testing.T) { |
| 1708 | const data = "test payload" |
nothing calls this directly
no test coverage detected