Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Commit

Permalink
add start of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuajbouw committed Feb 26, 2021
1 parent c2f1f46 commit a4fc44c
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions tests/test_upgrade.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
// use near_sdk_sim::{call, deploy, init_simulator};
//
// /// Load in contract bytes
// near_sdk_sim::lazy_static! {
// static ref EVM_WASM_BYTES: &'static [u8] = include_bytes!("../res/evm.wasm").as_ref();
// }
//
// fn init() {
// let master_account = init_simulator();
// }
//
// #[test]
// fn test_upgrade() {
// init();
// }
use near_sdk_sim::{call, deploy, ContractAccount};

/// Load in contract bytes
near_sdk_sim::lazy_static! {
static ref EVM_WASM_BYTES: &'static [u8] = include_bytes!("../res/evm.wasm").as_ref();
}

// Deploy
// init with owner
// change owner
// fail to change from another account
// stage contract
// upload contract
fn init() {
let master_account = near_sdk_sim::init_simulator(None);
let initial_balance = near_sdk_sim::to_yocto("100_000");
let contract_user = deploy!(
contract: todo!(), // Where is this from?
contract_id: "evm_contract",
bytes: &EVM_WASM_BYTES,
signer_accounts: master_account,
init_method: near_sdk_sim::new(master_account.account_id(), initial_balance.into())
);
}

#[test]
fn test_upgrade() {
init();
}

0 comments on commit a4fc44c

Please # to comment.