mirror of
https://github.com/photoprism/photoprism.git
synced 2025-09-26 21:01:58 +08:00
20 lines
350 B
Go
20 lines
350 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestOAuthUserinfo(t *testing.T) {
|
|
t.Run("PublicMode", func(t *testing.T) {
|
|
app, router, _ := NewApiTest()
|
|
|
|
OAuthUserinfo(router)
|
|
|
|
r := PerformRequest(app, http.MethodGet, "/api/v1/oauth/userinfo")
|
|
assert.Equal(t, http.StatusForbidden, r.Code)
|
|
})
|
|
}
|