summaryrefslogtreecommitdiff
path: root/impls/monero.rs/tests/integration_tests.rs
diff options
context:
space:
mode:
authorsneurlax <sneurlax@gmail.com>2024-10-18 17:51:41 -0500
committersneurlax <sneurlax@gmail.com>2024-10-18 17:51:41 -0500
commit0c0c4133b8edb1f9c8c972b9bacf89f58e04f7e7 (patch)
tree3dd98fa8a7617b4b88997a098ed30adba4df6b67 /impls/monero.rs/tests/integration_tests.rs
parentfa7fa687319971287cec8f2aca0a63e20feb4721 (diff)
add create_account
Diffstat (limited to 'impls/monero.rs/tests/integration_tests.rs')
-rw-r--r--impls/monero.rs/tests/integration_tests.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/impls/monero.rs/tests/integration_tests.rs b/impls/monero.rs/tests/integration_tests.rs
index 7c7fd0a..fd96228 100644
--- a/impls/monero.rs/tests/integration_tests.rs
+++ b/impls/monero.rs/tests/integration_tests.rs
@@ -390,3 +390,28 @@ fn test_get_balance_integration() {
teardown(&temp_dir).expect("Failed to clean up after test");
}
+
+#[test]
+fn test_create_account_integration() {
+ println!("Running test_create_account_integration");
+ let (manager, temp_dir) = setup().expect("Failed to set up test environment");
+
+ // Construct the full path for the wallet within temp_dir.
+ let wallet_path = temp_dir.path().join("test_wallet");
+ let wallet_str = wallet_path.to_str().expect("Failed to convert wallet path to string");
+
+ // Create the wallet.
+ let wallet = manager
+ .create_wallet(wallet_str, "password", "English", NetworkType::Mainnet)
+ .expect("Failed to create wallet");
+
+ // Create a new account with a label.
+ println!("Creating a new account...");
+ let start = Instant::now();
+ let result = wallet.create_account("Test Account Integration");
+ println!("create_account took {:?}", start.elapsed());
+
+ assert!(result.is_ok(), "Failed to create account: {:?}", result.err());
+
+ teardown(&temp_dir).expect("Failed to clean up after test");
+}