From 63d08a9f120e842dcc5a34a1db6b39957c643b30 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 23 Apr 2021 01:41:18 +0300 Subject: [WIP] Done, untested --- tests/route_tests.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'tests/route_tests.rs') diff --git a/tests/route_tests.rs b/tests/route_tests.rs index decc712..cfa1af6 100644 --- a/tests/route_tests.rs +++ b/tests/route_tests.rs @@ -24,6 +24,7 @@ FQIDAQAB -----END PUBLIC KEY-----" .to_owned(), balance: 30, + is_bot: false }, ); @@ -33,6 +34,7 @@ FQIDAQAB user_id: MetuId::new("e223715".to_owned(), "1H5QuOYI1b2r9ET".to_owned()).unwrap(), public_key: "NOT_USED_FOR_THIS_USER".to_owned(), balance: 0, + is_bot: false }, ); @@ -69,8 +71,7 @@ MRArEl4y68+jZLRu74TVG0lXi6ht6KhNHF6GiWKU9FHZ4B+btLicsg== db.pending_transactions.write().insert( "fingerprint_of_foo".to_owned(), Transaction { - by: "fingerprint_of_foo".to_owned(), - source: "31415926535897932384626433832795028841971693993751058209749445923" + source: "fingerprint_of_foo" .to_owned(), target: "fingerprint_of_foo".to_owned(), amount: 2, @@ -167,9 +168,8 @@ MRArEl4y68+jZLRu74TVG0lXi6ht6KhNHF6GiWKU9FHZ4B+btLicsg== let res = warp::test::request() .method("POST") .json(&Transaction { - by: "fingerprint_of_some_guy".to_owned(), - source: "31415926535897932384626433832795028841971693993751058209749445923".to_owned(), - target: "fingerprint_of_some_guy".to_owned(), + source: "fingerprint_of_some_guy".to_owned(), + target: "31415926535897932384626433832795028841971693993751058209749445923".to_owned(), amount: 2, timestamp: chrono::NaiveDate::from_ymd(2021, 04, 13).and_hms(20, 55, 30), }) @@ -200,7 +200,6 @@ MRArEl4y68+jZLRu74TVG0lXi6ht6KhNHF6GiWKU9FHZ4B+btLicsg== let res = warp::test::request() .method("POST") .json(&Transaction { - by: "some_fingerprint".to_owned(), source: "some_fingerprint".to_owned(), target: "some_other_fingerprint".to_owned(), amount: 2, @@ -232,10 +231,9 @@ MRArEl4y68+jZLRu74TVG0lXi6ht6KhNHF6GiWKU9FHZ4B+btLicsg== db.pending_transactions.write().insert( "fingerprint_of_some_guy".to_owned(), Transaction { - by: "fingerprint_of_some_guy".to_owned(), - source: "31415926535897932384626433832795028841971693993751058209749445923" + source: "fingerprint_of_some_guy" .to_owned(), - target: "fingerprint_of_some_guy".to_owned(), + target: "31415926535897932384626433832795028841971693993751058209749445923".to_owned(), amount: 2, timestamp: chrono::NaiveDate::from_ymd(2021, 04, 13).and_hms(20, 55, 30), }, -- cgit v1.2.3-70-g09d2