...

Source file src/github.com/fergusstrange/embedded-postgres/test_config.go

Documentation: github.com/fergusstrange/embedded-postgres

     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  

View as plain text