postg 0.1.7

Embedded PostgreSQL manager for Rust
Documentation
use postg::config::{Config, Engine};

#[test]
fn default_config_uses_vanilla_engine() {
    let config = Config::default();
    assert_eq!(config.engine, Engine::Postgresql);
    assert_eq!(config.host, "127.0.0.1");
    assert!(config.temporary);
}

#[test]
fn connection_string_format() {
    let config = Config {
        port: 5432,
        ..Config::default()
    };
    assert_eq!(
        config.connection_string(),
        "postgresql://postgres@127.0.0.1:5432/postgres"
    );
}