(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestSecureWithSkipRequestBodyEncodeDecode(t *testing.T) { |
| 66 | cases := []struct { |
| 67 | Name string |
| 68 | DSL func() |
| 69 | Code string |
| 70 | }{ |
| 71 | {"with-basicauth", testdata.EndpointWithBasicAuthAndSkipRequestBodyEncodeDecodeDSL, testdata.EndpointWithBasicAuthAndSkipRequestBodyEncodeDecodeCode}, |
| 72 | } |
| 73 | for _, c := range cases { |
| 74 | t.Run(c.Name, func(t *testing.T) { |
| 75 | root := codegen.RunDSL(t, c.DSL) |
| 76 | services := NewServicesData(root) |
| 77 | require.Len(t, root.Services, 1) |
| 78 | fs := EndpointFile("", root.Services[0], services) |
| 79 | require.NotNil(t, fs) |
| 80 | sections := fs.SectionTemplates |
| 81 | code := codegen.SectionCode(t, sections[5]) |
| 82 | assert.Equal(t, c.Code, code) |
| 83 | }) |
| 84 | } |
| 85 | } |
nothing calls this directly
no test coverage detected