Feat: put / get file in qiniu policy

This commit is contained in:
HFO4
2020-01-15 16:03:23 +08:00
parent 7fbbcefc57
commit 90f82100cf
8 changed files with 158 additions and 92 deletions

View File

@@ -211,3 +211,15 @@ func TestResponse_DecodeResponse(t *testing.T) {
asserts.Equal(0, response.Code)
}
}
func TestNopRSCloser_SetFirstFakeChunk(t *testing.T) {
asserts := assert.New(t)
rsc := NopRSCloser{
status: &rscStatus{},
}
rsc.SetFirstFakeChunk()
asserts.True(rsc.status.IgnoreFirst)
rsc.SetContentLength(20)
asserts.EqualValues(20, rsc.status.Size)
}