added new membership tests, fix tests, cors for dev

This commit is contained in:
$(pass /github/name)
2024-08-24 21:15:38 +02:00
parent 4274f386f7
commit c03ee0b6d0
8 changed files with 96 additions and 31 deletions

View File

@@ -34,12 +34,14 @@ func TestContactController(t *testing.T) {
}
}
func (rt *RelayContactRequestTest) SetupContext() (*gin.Context, *httptest.ResponseRecorder) {
func (rt *RelayContactRequestTest) SetupContext() (*gin.Context, *httptest.ResponseRecorder, *gin.Engine) {
return GetMockedFormContext(rt.Input, "/contact")
}
func (rt *RelayContactRequestTest) RunHandler(c *gin.Context) {
Cc.RelayContactRequest(c)
func (rt *RelayContactRequestTest) RunHandler(c *gin.Context, router *gin.Engine) {
router.POST("/contact", Cc.RelayContactRequest)
router.ServeHTTP(c.Writer, c.Request)
// Cc.RelayContactRequest(c)
}
func (rt *RelayContactRequestTest) ValidateResponse(w *httptest.ResponseRecorder) error {