|
@@ -31,7 +31,7 @@ fn open_test() {
|
|
|
|
|
|
#[test]
|
|
#[test]
|
|
fn check_for_inserted() {
|
|
fn check_for_inserted() {
|
|
- let db = common::open_test_db::<PeopleDB>("derive_check_for_inserted");
|
|
|
|
|
|
+ let db: PeopleDB = common::open_test_db!();
|
|
let name_string = "name_here".to_string();
|
|
let name_string = "name_here".to_string();
|
|
// check that it isn't in the database before we insert it
|
|
// check that it isn't in the database before we insert it
|
|
assert!(db.people.keyed(&name_string).get().ok().flatten().is_none());
|
|
assert!(db.people.keyed(&name_string).get().ok().flatten().is_none());
|
|
@@ -49,7 +49,7 @@ fn check_for_inserted() {
|
|
|
|
|
|
#[test]
|
|
#[test]
|
|
fn check_relation_query_construction() {
|
|
fn check_relation_query_construction() {
|
|
- let db = common::open_test_db::<PeopleDB>("derive_check_relation_query_construction");
|
|
|
|
|
|
+ let db: PeopleDB = common::open_test_db!();
|
|
|
|
|
|
let name_string = "name_here".to_string();
|
|
let name_string = "name_here".to_string();
|
|
db.people
|
|
db.people
|
|
@@ -75,7 +75,7 @@ fn check_relation_query_construction() {
|
|
|
|
|
|
#[test]
|
|
#[test]
|
|
fn check_relation_insertion() {
|
|
fn check_relation_insertion() {
|
|
- let db = common::open_test_db::<PeopleDB>("derive_check_relation_insertion");
|
|
|
|
|
|
+ let db: PeopleDB = common::open_test_db!();
|
|
|
|
|
|
let name_string = "name_here".to_string();
|
|
let name_string = "name_here".to_string();
|
|
db.people
|
|
db.people
|
|
@@ -101,7 +101,7 @@ fn check_relation_insertion() {
|
|
|
|
|
|
#[test]
|
|
#[test]
|
|
fn delete_test() {
|
|
fn delete_test() {
|
|
- let db = common::open_test_db::<PeopleDB>("derive_delete_test");
|
|
|
|
|
|
+ let db: PeopleDB = common::open_test_db!();
|
|
|
|
|
|
let id = db
|
|
let id = db
|
|
.people
|
|
.people
|
|
@@ -124,7 +124,7 @@ fn delete_test() {
|
|
|
|
|
|
#[test]
|
|
#[test]
|
|
fn remove_test() {
|
|
fn remove_test() {
|
|
- let db = common::open_test_db::<PeopleDB>("derive_remove_test");
|
|
|
|
|
|
+ let db: PeopleDB = common::open_test_db!();
|
|
|
|
|
|
let id = db
|
|
let id = db
|
|
.people
|
|
.people
|
|
@@ -151,7 +151,7 @@ fn remove_test() {
|
|
|
|
|
|
#[test]
|
|
#[test]
|
|
fn update_test() {
|
|
fn update_test() {
|
|
- let db = common::open_test_db::<PeopleDB>("derive_update_test");
|
|
|
|
|
|
+ let db: PeopleDB = common::open_test_db!();
|
|
|
|
|
|
let mut stored = db
|
|
let mut stored = db
|
|
.people
|
|
.people
|