Skip to content

Commit

Permalink
tests, wip
Browse files Browse the repository at this point in the history
  • Loading branch information
hardyjosh committed Jan 8, 2024
1 parent 2af497c commit 434ce19
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions crates/cli/src/commands/deposit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,30 @@ impl DepositArgs {
})
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_to_deposit_call_valid() {
let args = DepositArgs {
token: "0xdcdee0E7a58Bba7e305dB3Abc42F4887CE8EF729".to_string(),
amount: 100,
vault_id: 1,
};
let result = args.to_deposit_call();
assert!(result.is_ok());
}

#[test]
fn test_to_deposit_call_invalid_token() {
let args = DepositArgs {
token: "invalid".to_string(),
amount: 100,
vault_id: 1,
};
assert!(args.to_deposit_call().is_err());
}
}

0 comments on commit 434ce19

Please sign in to comment.