(t *testing.T)
| 393 | } |
| 394 | |
| 395 | func TestResolveDestination_TargetNotFound(t *testing.T) { |
| 396 | mock := &mockFilesClient{ |
| 397 | getMetadataFn: func(arg *files.GetMetadataArg) (files.IsMetadata, error) { |
| 398 | return nil, fmt.Errorf("path/not_found/") |
| 399 | }, |
| 400 | } |
| 401 | got := resolveDestination(mock, "/local/a.txt", "/new-name", false) |
| 402 | if got != "/new-name" { |
| 403 | t.Errorf("resolveDestination = %q, want /new-name", got) |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | func TestResolveDestination_ExplicitDirectory(t *testing.T) { |
| 408 | mock := &mockFilesClient{} |
nothing calls this directly
no test coverage detected