(t *testing.T)
| 391 | } |
| 392 | |
| 393 | func Test_detectEmptyFiles(t *testing.T) { |
| 394 | tests := []struct { |
| 395 | content string |
| 396 | isEmptyFile bool |
| 397 | }{ |
| 398 | { |
| 399 | content: "{}", |
| 400 | isEmptyFile: false, |
| 401 | }, |
| 402 | { |
| 403 | content: "\n\t", |
| 404 | isEmptyFile: true, |
| 405 | }, |
| 406 | } |
| 407 | |
| 408 | for _, tt := range tests { |
| 409 | files := map[string]*shared.GistFile{} |
| 410 | files["file"] = &shared.GistFile{ |
| 411 | Content: tt.content, |
| 412 | } |
| 413 | |
| 414 | isEmptyFile := detectEmptyFiles(files) |
| 415 | assert.Equal(t, tt.isEmptyFile, isEmptyFile) |
| 416 | } |
| 417 | } |
nothing calls this directly
no test coverage detected