Feat experimental WebAuth API

This commit is contained in:
HFO4
2019-12-08 22:17:36 +08:00
parent 0932a10fed
commit f35c585edf
14 changed files with 269 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ import (
"errors"
model "github.com/HFO4/cloudreve/models"
"github.com/HFO4/cloudreve/pkg/filesystem/local"
"github.com/HFO4/cloudreve/pkg/filesystem/response"
"github.com/gin-gonic/gin"
"github.com/jinzhu/gorm"
"github.com/stretchr/testify/assert"
@@ -34,6 +35,11 @@ func (m FileHeaderMock) Delete(ctx context.Context, files []string) ([]string, e
return args.Get(0).([]string), args.Error(1)
}
func (m FileHeaderMock) Thumb(ctx context.Context, files string) (*response.ContentResponse, error) {
args := m.Called(ctx, files)
return args.Get(0).(*response.ContentResponse), args.Error(1)
}
func TestFileSystem_Upload(t *testing.T) {
asserts := assert.New(t)