refactor: edit capabilities

This commit is contained in:
2026-05-25 15:25:38 +03:00
parent dff83c6b60
commit 07669d43c8
10 changed files with 1396 additions and 903 deletions
-35
View File
@@ -39,38 +39,3 @@ func TestConfig_GetLogLevel(t *testing.T) {
})
}
}
func TestConfig_GetURLPostgres(t *testing.T) {
t.Parallel()
tests := []struct {
name string
cfg Config
wantURLPostgres string
}{
{
name: "success",
cfg: Config{
DBHost: "TestHost",
DBName: "TestName",
DBPassword: "TestPassword",
DBPort: 1234,
DBUser: "TestUser",
},
wantURLPostgres: "postgres://TestUser:TestPassword@TestHost:1234/TestName?sslmode=disable",
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
url := tt.cfg.GetURLPostgres()
if url != tt.wantURLPostgres {
t.Fatalf("expected %v, got: %v", tt.wantURLPostgres, url)
}
})
}
}