You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
522 B
22 lines
522 B
package wopimock
|
|
|
|
import (
|
|
model "github.com/cloudreve/Cloudreve/v3/models"
|
|
"github.com/cloudreve/Cloudreve/v3/pkg/wopi"
|
|
"github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
type WopiClientMock struct {
|
|
mock.Mock
|
|
}
|
|
|
|
func (w *WopiClientMock) NewSession(user *model.User, file *model.File, action wopi.ActonType) (*wopi.Session, error) {
|
|
args := w.Called(user, file, action)
|
|
return args.Get(0).(*wopi.Session), args.Error(1)
|
|
}
|
|
|
|
func (w *WopiClientMock) AvailableExts() []string {
|
|
args := w.Called()
|
|
return args.Get(0).([]string)
|
|
}
|