RunForWebAndAPI runs the given test function for web and API
(t *testing.T, name string, runTest endpointTest)
| 259 | |
| 260 | // RunForWebAndAPI runs the given test function for web and API |
| 261 | func RunForWebAndAPI(t *testing.T, name string, runTest endpointTest) { |
| 262 | t.Run(fmt.Sprintf("%s-web", name), func(t *testing.T) { |
| 263 | runTest(t, EndpointWeb) |
| 264 | }) |
| 265 | |
| 266 | t.Run(fmt.Sprintf("%s-api", name), func(t *testing.T) { |
| 267 | runTest(t, EndpointAPI) |
| 268 | }) |
| 269 | } |
| 270 | |
| 271 | // PayloadWrapper is a wrapper for a payload that can be converted to |
| 272 | // either URL form values or JSON |
no outgoing calls