Files
GoMFT/internal/web/handlers/basic_handlers_test.go
T
StarFleetCPTN 558e81c7e8 feat: Enhance configuration handling and UI for job management
- Update .gitignore to include new provider files and ensure proper tracking.
- Refactor job and config forms to support multiple configuration selections, improving user experience.
- Implement logic to handle the initialization of skipProcessedFiles with a default value.
- Add new provider form templates for better organization and management of source and destination configurations.
- Enhance tests for provider forms and job configurations to ensure robust functionality.
- Introduce nullable handling for skipProcessedFiles in the database schema and update related migrations.
- Improve error handling and validation in job creation and editing processes.
2025-03-14 16:30:43 -07:00

30 lines
601 B
Go

package handlers
import (
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
)
func TestHandleHome(t *testing.T) {
// Set up test environment
handlers, router := setupTestHandlers(t)
// Set up the route
router.GET("/", handlers.HandleHome)
// Create a test request
req := httptest.NewRequest("GET", "/", nil)
w := httptest.NewRecorder()
// Serve the request
router.ServeHTTP(w, req)
// Check response
assert.Equal(t, http.StatusOK, w.Code)
assert.Contains(t, w.Body.String(), "Home - GoMFT")
assert.Contains(t, w.Body.String(), "Welcome to GoMFT")
}