diff options
| author | sneurlax <sneurlax@gmail.com> | 2024-10-16 21:02:46 -0500 |
|---|---|---|
| committer | sneurlax <sneurlax@gmail.com> | 2024-10-16 21:02:46 -0500 |
| commit | 0a57eb46c60cdad91bd50ebe866b063a8fedf01c (patch) | |
| tree | dbc5d08a43ceb397b0e098eb412576032ca1751c /impls/monero.rs/tests/integration_tests.rs | |
| parent | edfe554205b48b325642360dd0b2adef5f1d9955 (diff) | |
add get_status fn for error-handling
Diffstat (limited to 'impls/monero.rs/tests/integration_tests.rs')
| -rw-r--r-- | impls/monero.rs/tests/integration_tests.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/impls/monero.rs/tests/integration_tests.rs b/impls/monero.rs/tests/integration_tests.rs index 0235bb8..2e439d1 100644 --- a/impls/monero.rs/tests/integration_tests.rs +++ b/impls/monero.rs/tests/integration_tests.rs @@ -264,3 +264,21 @@ fn test_wallet_error_display() { _ => panic!("Expected WalletErrorCode variant"), } } + +#[test] +fn test_wallet_status_integration() { + let (manager, temp_dir) = setup().expect("Failed to set up test environment"); + + // Create a wallet. + let wallet_path = temp_dir.path().join("test_wallet"); + let wallet_str = wallet_path.to_str().expect("Failed to convert wallet path to string"); + let wallet = manager.create_wallet(wallet_str, "password", "English", NetworkType::Mainnet) + .expect("Failed to create wallet"); + + // Check the status of the wallet. + let status = manager.get_status(wallet.ptr.as_ptr()); + assert!(status.is_ok(), "Expected status OK, got error: {:?}", status.err()); + + // Clean up. + teardown(&temp_dir).expect("Failed to clean up after test"); +} |
