package testserver import ( "testing" "github.com/stretchr/testify/assert" ) func TestCreateTestConfig(t *testing.T) { // Test 1: Default config (no test config file) t.Run("DefaultConfig", func(t *testing.T) { cfg := createTestConfig(9999, false) assert.Equal(t, "0.0.0.0", cfg.Server.Host) assert.Equal(t, 9999, cfg.Server.Port) assert.Equal(t, "test-secret-key-for-bdd-tests", cfg.Auth.JWTSecret) assert.Equal(t, "admin123", cfg.Auth.AdminMasterPassword) assert.Equal(t, "dance_lessons_coach", cfg.Database.Name) }) // Test 2: Config with v2 enabled t.Run("V2EnabledConfig", func(t *testing.T) { cfg := createTestConfig(9999, true) assert.Equal(t, "0.0.0.0", cfg.Server.Host) assert.Equal(t, 9999, cfg.Server.Port) assert.True(t, cfg.API.V2Enabled) }) }