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) {
|
2024-01-08 14:53:39 +01:00
|
|
|
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)
|
|
|
|
})
|
|
|
|
}
|