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.
26 lines
597 B
26 lines
597 B
2 years ago
|
package wopi
|
||
|
|
||
|
import (
|
||
|
model "github.com/cloudreve/Cloudreve/v3/models"
|
||
|
"github.com/cloudreve/Cloudreve/v3/pkg/cache"
|
||
|
"github.com/cloudreve/Cloudreve/v3/pkg/request"
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
"net/url"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestDiscovery(t *testing.T) {
|
||
|
a := assert.New(t)
|
||
|
endpoint, _ := url.Parse("http://localhost:8001/hosting/discovery")
|
||
|
client := &client{
|
||
|
cache: cache.Store,
|
||
|
http: request.NewClient(),
|
||
|
config: config{
|
||
|
discoveryEndpoint: endpoint,
|
||
|
},
|
||
|
}
|
||
|
|
||
|
a.NoError(client.refreshDiscovery())
|
||
|
client.NewSession(nil, &model.File{Name: "123.pptx"}, ActionPreview)
|
||
|
}
|