github.com/cloudreve/Cloudreve/v3@v3.0.0-20240224133659-3edb00a6484c/pkg/authn/auth_test.go (about)

     1  package authn
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/cloudreve/Cloudreve/v3/pkg/cache"
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func TestInit(t *testing.T) {
    11  	asserts := assert.New(t)
    12  	cache.Set("setting_siteURL", "http://cloudreve.org", 0)
    13  	cache.Set("setting_siteName", "Cloudreve", 0)
    14  	res, err := NewAuthnInstance()
    15  	asserts.NotNil(res)
    16  	asserts.NoError(err)
    17  }