(t *testing.T)
| 381 | } |
| 382 | |
| 383 | func TestResolveDestination_TargetIsFile(t *testing.T) { |
| 384 | mock := &mockFilesClient{ |
| 385 | getMetadataFn: func(arg *files.GetMetadataArg) (files.IsMetadata, error) { |
| 386 | return &files.FileMetadata{}, nil |
| 387 | }, |
| 388 | } |
| 389 | got := resolveDestination(mock, "/local/a.txt", "/existing.txt", false) |
| 390 | if got != "/existing.txt" { |
| 391 | t.Errorf("resolveDestination = %q, want /existing.txt", got) |
| 392 | } |
| 393 | } |
| 394 | |
| 395 | func TestResolveDestination_TargetNotFound(t *testing.T) { |
| 396 | mock := &mockFilesClient{ |
nothing calls this directly
no test coverage detected