mirror of
https://github.com/rclone/rclone.git
synced 2025-04-19 18:31:10 +08:00
lsjson: update tests
This commit is contained in:
parent
7827ccea68
commit
09c46c0efe
@ -406,13 +406,13 @@ func TestStatJSON(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func TestStatJsonAutoFilename(t *testing.T) {
|
||||
func TestStatJsonMetadataContentDisposition(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
r := fstest.NewRun(t)
|
||||
file1 := fstest.Item{Path: "file1", ModTime: t1, Size: 5}
|
||||
metadata := fs.Metadata{"content-disposition": "Attachment; filename=file1.txt"}
|
||||
fstests.PutTestContentsMetadata(ctx, t, r.Fremote, &file1, false, "file1", true, "", metadata)
|
||||
got, err := operations.StatJSON(ctx, r.Fremote, "file1", &operations.ListJSONOpt{AutoFilename: true})
|
||||
got, err := operations.StatJSON(ctx, r.Fremote, "file1", &operations.ListJSONOpt{Metadata: true})
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, got)
|
||||
assert.Equal(t, "file1.txt", got.Name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user