(t *testing.T)
| 202 | } |
| 203 | |
| 204 | func TestInlineDataSubdir(t *testing.T) { |
| 205 | tests := []struct { |
| 206 | name string |
| 207 | inputData []byte |
| 208 | expectedSubdir string |
| 209 | }{ |
| 210 | { |
| 211 | name: "simple data returns data subdir", |
| 212 | inputData: []byte("test data"), |
| 213 | expectedSubdir: "data", |
| 214 | }, |
| 215 | { |
| 216 | name: "json data returns data subdir", |
| 217 | inputData: []byte(`{"key": "value"}`), |
| 218 | expectedSubdir: "data", |
| 219 | }, |
| 220 | { |
| 221 | name: "empty data returns data subdir", |
| 222 | inputData: []byte(""), |
| 223 | expectedSubdir: "data", |
| 224 | }, |
| 225 | } |
| 226 | |
| 227 | for _, tt := range tests { |
| 228 | t.Run(tt.name, func(t *testing.T) { |
| 229 | s := InlineData(tt.inputData) |
| 230 | |
| 231 | result := s.Subdir() |
| 232 | |
| 233 | assert.Equal(t, tt.expectedSubdir, result) |
| 234 | assert.Equal(t, "data", result, "Subdir should always return 'data' regardless of input") |
| 235 | }) |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | func TestInlineDataGetPolicy(t *testing.T) { |
| 240 | tests := []struct { |
nothing calls this directly
no test coverage detected