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