add test for non-public contract invocation failure

This commit is contained in:
Aaron Blankstein
2019-02-12 08:55:08 -06:00
parent 71934673ce
commit 7a5e1bbe30

View File

@@ -69,4 +69,15 @@ fn test_factorial_contract() {
&Value::Void,
&tx_name,
arguments)));
let err_result = contract.execute_transaction(&Value::Void, &"init-factorial",
&symbols_from_values(vec![Value::Int(9000),
Value::Int(15)]));
match err_result {
Err(Error::Undefined(_)) => {},
_ => {
println!("{:?}", err_result);
assert!(false, "Attempt to call init-factorial should fail!")
}
}
}