photoprism/internal/api/user_test.go
Michael Mayer 46b9239026 Backend: Refactor user entity and add pro package
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-10-03 13:50:30 +02:00

17 lines
365 B
Go

package api
import (
"github.com/stretchr/testify/assert"
"net/http"
"testing"
)
func TestChangePassword(t *testing.T) {
t.Run("not existing user", func(t *testing.T) {
app, router, _ := NewApiTest()
ChangePassword(router)
r := PerformRequestWithBody(app, "PUT", "/api/v1/users/xxx/password", `{}`)
assert.Equal(t, http.StatusForbidden, r.Code)
})
}