photoprism/internal/api/feedback_test.go
2020-11-21 18:08:41 +01:00

16 lines
403 B
Go

package api
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSendFeedback(t *testing.T) {
t.Run("not available in public mode", func(t *testing.T) {
app, router, _ := NewApiTest()
SendFeedback(router)
r := PerformRequestWithBody(app, "POST", "/api/v1/feedback", `{"Subject": "Send feedback from unit test", "Message": "Test message"}`)
assert.Equal(t, 403, r.Code)
})
}