mockgres 0.0.29

An in-memory database that replicates a reasonable subset of Postgres functionality to make unit tests that rely on a database to run.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
mod common;

#[tokio::test(flavor = "multi_thread")]
async fn empty_query_via_extended_protocol() {
    let ctx = common::start().await;

    let rows = ctx
        .client
        .execute(";", &[])
        .await
        .expect("execute empty query");

    assert_eq!(rows, 0);
}