(t *testing.T)
| 34 | } |
| 35 | |
| 36 | func TestWriteTempFile(t *testing.T) { |
| 37 | fs := afero.NewMemMapFs() |
| 38 | data := "file contents" |
| 39 | ctx := WithFS(context.Background(), fs) |
| 40 | path, err := WriteTempFile(ctx, data, "ec") |
| 41 | assert.NoError(t, err) |
| 42 | contents, err := afero.ReadFile(fs, path) |
| 43 | assert.NoError(t, err) |
| 44 | assert.Equal(t, data, string(contents)) |
| 45 | } |
| 46 | |
| 47 | func TestIsJson(t *testing.T) { |
| 48 | tests := []struct { |
nothing calls this directly
no test coverage detected