admin tests

This commit is contained in:
Hardhat Chad
2024-02-16 19:51:54 +00:00
parent ecbe2bb40a
commit d158742958
6 changed files with 148 additions and 75 deletions

View File

@@ -20,7 +20,7 @@ use spl_token::state::{AccountState, Mint};
#[tokio::test]
async fn test_reset() {
// Setup
let (mut banks, payer, hash) = setup_program_test_env().await;
let (mut banks, payer, blockhash) = setup_program_test_env().await;
// Pdas
let bus_pdas = vec![
@@ -40,7 +40,7 @@ async fn test_reset() {
// Submit tx
let ix = ore::instruction::reset(payer.pubkey());
let tx = Transaction::new_signed_with_payer(&[ix], Some(&payer.pubkey()), &[&payer], hash);
let tx = Transaction::new_signed_with_payer(&[ix], Some(&payer.pubkey()), &[&payer], blockhash);
let res = banks.process_transaction(tx).await;
assert!(res.is_ok());