@@ -41,72 +41,40 @@ func TestNewSet(t *testing.T) {
4141 expectedErr : "invalid target: cursor.foo" ,
4242 },
4343 {
44- name : "newSetRequest targets body" ,
45- constructor : newSetRequest ,
44+ name : "newSetRequestPagination targets body" ,
45+ constructor : newSetRequestPagination ,
4646 config : map [string ]interface {}{
4747 "target" : "body.foo" ,
4848 },
4949 expectedTarget : targetInfo {Name : "foo" , Type : "body" },
5050 },
5151 {
52- name : "newSetRequest targets header" ,
53- constructor : newSetRequest ,
52+ name : "newSetRequestPagination targets header" ,
53+ constructor : newSetRequestPagination ,
5454 config : map [string ]interface {}{
5555 "target" : "header.foo" ,
5656 },
5757 expectedTarget : targetInfo {Name : "foo" , Type : "header" },
5858 },
5959 {
60- name : "newSetRequest targets url param" ,
61- constructor : newSetRequest ,
60+ name : "newSetRequestPagination targets url param" ,
61+ constructor : newSetRequestPagination ,
6262 config : map [string ]interface {}{
6363 "target" : "url.params.foo" ,
6464 },
6565 expectedTarget : targetInfo {Name : "foo" , Type : "url.params" },
6666 },
6767 {
68- name : "newSetRequest targets something else" ,
69- constructor : newSetRequest ,
70- config : map [string ]interface {}{
71- "target" : "cursor.foo" ,
72- },
73- expectedErr : "invalid target: cursor.foo" ,
74- },
75- {
76- name : "newSetPagination targets body" ,
77- constructor : newSetPagination ,
78- config : map [string ]interface {}{
79- "target" : "body.foo" ,
80- },
81- expectedTarget : targetInfo {Name : "foo" , Type : "body" },
82- },
83- {
84- name : "newSetPagination targets header" ,
85- constructor : newSetPagination ,
86- config : map [string ]interface {}{
87- "target" : "header.foo" ,
88- },
89- expectedTarget : targetInfo {Name : "foo" , Type : "header" },
90- },
91- {
92- name : "newSetPagination targets url param" ,
93- constructor : newSetPagination ,
94- config : map [string ]interface {}{
95- "target" : "url.params.foo" ,
96- },
97- expectedTarget : targetInfo {Name : "foo" , Type : "url.params" },
98- },
99- {
100- name : "newSetPagination targets url value" ,
101- constructor : newSetPagination ,
68+ name : "newSetRequestPagination targets url value" ,
69+ constructor : newSetRequestPagination ,
10270 config : map [string ]interface {}{
10371 "target" : "url.value" ,
10472 },
10573 expectedTarget : targetInfo {Type : "url.value" },
10674 },
10775 {
108- name : "newSetPagination targets something else" ,
109- constructor : newSetPagination ,
76+ name : "newSetRequestPagination targets something else" ,
77+ constructor : newSetRequestPagination ,
11078 config : map [string ]interface {}{
11179 "target" : "cursor.foo" ,
11280 },
0 commit comments