From d45c5de41dcaa44fc0e65ed103fa62f48c1c40dc Mon Sep 17 00:00:00 2001 From: alpaylan Date: Fri, 16 Apr 2021 01:55:44 +0300 Subject: change mocked db. --- src/schema.rs | 2 +- tests/route_tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schema.rs b/src/schema.rs index b63b0c1..df7b14a 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -152,7 +152,7 @@ pub struct Db { } impl Db { - fn new() -> Self { + pub fn new() -> Self { let mut users: HashMap = HashMap::new(); let bank_acc = MetuId::new("bank".to_owned(), "P7oxDm30g1jeIId".to_owned()).unwrap(); diff --git a/tests/route_tests.rs b/tests/route_tests.rs index 55a536d..09aa10e 100644 --- a/tests/route_tests.rs +++ b/tests/route_tests.rs @@ -7,7 +7,7 @@ mod tests { /// Create a mock database to be used in tests fn mocked_db() -> Db { - let db = create_database(); + let db = Db::new(); db.users.write().insert( "mock_transaction_source".to_owned(), -- cgit v1.2.3-70-g09d2