photoprism/internal/api/feedback_test.go

17 lines
385 B
Go
Raw Normal View History

2020-10-19 16:11:42 +02:00
package api
import (
"testing"
2020-11-21 18:08:41 +01:00
"github.com/stretchr/testify/assert"
2020-10-19 16:11:42 +02:00
)
func TestSendFeedback(t *testing.T) {
t.Run("PublicMode", func(t *testing.T) {
2020-10-19 16:11:42 +02:00
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)
})
}