@@ -45,7 +45,8 @@ func TestCallHTTP_MarshalJSON(t *testing.T) {
4545 Query : map [string ]interface {}{
4646 "q" : "search" ,
4747 },
48- Output : "content" ,
48+ Output : "content" ,
49+ Redirect : true ,
4950 },
5051 }
5152
@@ -64,7 +65,8 @@ func TestCallHTTP_MarshalJSON(t *testing.T) {
6465 "endpoint": "http://example.com",
6566 "headers": {"Authorization": "Bearer token"},
6667 "query": {"q": "search"},
67- "output": "content"
68+ "output": "content",
69+ "redirect": true
6870 }
6971 }` , string (data ))
7072}
@@ -83,7 +85,8 @@ func TestCallHTTP_UnmarshalJSON(t *testing.T) {
8385 "endpoint": "http://example.com",
8486 "headers": {"Authorization": "Bearer token"},
8587 "query": {"q": "search"},
86- "output": "content"
88+ "output": "content",
89+ "redirect": true
8790 }
8891 }`
8992
@@ -102,6 +105,7 @@ func TestCallHTTP_UnmarshalJSON(t *testing.T) {
102105 assert .Equal (t , map [string ]string {"Authorization" : "Bearer token" }, callHTTP .With .Headers )
103106 assert .Equal (t , map [string ]interface {}{"q" : "search" }, callHTTP .With .Query )
104107 assert .Equal (t , "content" , callHTTP .With .Output )
108+ assert .Equal (t , true , callHTTP .With .Redirect )
105109}
106110
107111func TestCallOpenAPI_MarshalJSON (t * testing.T ) {
@@ -133,7 +137,8 @@ func TestCallOpenAPI_MarshalJSON(t *testing.T) {
133137 Authentication : & ReferenceableAuthenticationPolicy {
134138 Use : & authPolicy ,
135139 },
136- Output : "content" ,
140+ Output : "content" ,
141+ Redirect : true ,
137142 },
138143 }
139144
@@ -160,7 +165,8 @@ func TestCallOpenAPI_MarshalJSON(t *testing.T) {
160165 "authentication": {
161166 "use": "my-auth"
162167 },
163- "output": "content"
168+ "output": "content",
169+ "redirect": true
164170 }
165171 }` , string (data ))
166172}
@@ -187,7 +193,8 @@ func TestCallOpenAPI_UnmarshalJSON(t *testing.T) {
187193 "authentication": {
188194 "use": "my-auth"
189195 },
190- "output": "content"
196+ "output": "content",
197+ "redirect": true
191198 }
192199 }`
193200
@@ -207,6 +214,7 @@ func TestCallOpenAPI_UnmarshalJSON(t *testing.T) {
207214 assert .Equal (t , map [string ]interface {}{"param1" : "value1" , "param2" : "value2" }, callOpenAPI .With .Parameters )
208215 assert .Equal (t , "my-auth" , * callOpenAPI .With .Authentication .Use )
209216 assert .Equal (t , "content" , callOpenAPI .With .Output )
217+ assert .Equal (t , true , callOpenAPI .With .Redirect )
210218}
211219
212220func TestCallGRPC_MarshalJSON (t * testing.T ) {
0 commit comments