2019-12-09 11:33:39 +08:00
|
|
|
package authn
|
|
|
|
|
|
|
|
import (
|
2020-02-21 12:09:43 +08:00
|
|
|
"github.com/HFO4/cloudreve/pkg/cache"
|
2019-12-09 11:33:39 +08:00
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestInit(t *testing.T) {
|
|
|
|
asserts := assert.New(t)
|
2020-02-21 12:09:43 +08:00
|
|
|
cache.Set("setting_siteURL", "http://cloudreve.org", 0)
|
|
|
|
cache.Set("setting_siteName", "Cloudreve", 0)
|
2020-02-23 15:50:41 +08:00
|
|
|
res, err := NewAuthnInstance()
|
|
|
|
asserts.NotNil(res)
|
|
|
|
asserts.NoError(err)
|
2019-12-09 11:33:39 +08:00
|
|
|
}
|