(t *testing.T)
| 677 | } |
| 678 | |
| 679 | func TestIsListRevisionsNotFileErrorHandlesWrappedErrors(t *testing.T) { |
| 680 | apiErr := files.ListRevisionsAPIError{ |
| 681 | EndpointError: &files.ListRevisionsError{ |
| 682 | Path: &files.LookupError{Tagged: dropbox.Tagged{Tag: files.LookupErrorNotFile}}, |
| 683 | }, |
| 684 | } |
| 685 | |
| 686 | if !isListRevisionsNotFileError(apiErr) { |
| 687 | t.Fatal("expected raw list_revisions not_file error to match") |
| 688 | } |
| 689 | if !isListRevisionsNotFileError(fmt.Errorf("wrapped: %w", apiErr)) { |
| 690 | t.Fatal("expected wrapped list_revisions not_file error to match") |
| 691 | } |
| 692 | } |
| 693 | |
| 694 | func contains(s, substr string) bool { |
| 695 | return len(s) >= len(substr) && (s == substr || len(s) > 0 && stringContains(s, substr)) |
nothing calls this directly
no test coverage detected