update
This commit is contained in:
@@ -65,6 +65,15 @@ func setupChatwootAuthTest(t *testing.T) (*gin.Engine, *gorm.DB, *model.User) {
|
||||
return router, db, user
|
||||
}
|
||||
|
||||
func TestRegisterAuthRoutesDoesNotExposeSelfRegistration(t *testing.T) {
|
||||
router := gin.New()
|
||||
RegisterAuthRoutes(router.Group("/api/v1"), &AuthHandler{})
|
||||
|
||||
for _, route := range router.Routes() {
|
||||
require.NotEqual(t, "/api/v1/auth/register", route.Path)
|
||||
}
|
||||
}
|
||||
|
||||
func TestChatwootAuthSignInReturnsDeviseHeadersAndUserPayload(t *testing.T) {
|
||||
router, _, _ := setupChatwootAuthTest(t)
|
||||
body, _ := json.Marshal(map[string]string{"email": " AUTH@example.com ", "password": "password123"})
|
||||
|
||||
Reference in New Issue
Block a user