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