1 package embeddedpostgres 2 3 import "testing" 4 5 func TestGetConnectionURL(t *testing.T) { 6 config := DefaultConfig().Database("mydb").Username("myuser").Password("mypass") 7 expect := "postgresql://myuser:mypass@localhost:5432/mydb" 8 9 if got := config.GetConnectionURL(); got != expect { 10 t.Errorf("expected \"%s\" got \"%s\"", expect, got) 11 } 12 } 13