chore: add a test for by name with params

This commit is contained in:
rvcas
2024-08-27 18:10:46 -04:00
parent 9943c2cc7a
commit d337e601cb
5 changed files with 88 additions and 52 deletions

View File

@@ -3068,6 +3068,23 @@ fn validator_by_name() {
assert!(check_validator(parse(source_code)).is_ok())
}
#[test]
fn validator_by_name_with_params() {
let source_code = r#"
validator foo(_thing: Data) {
mint(_redeemer: Data, policy_id: ByteArray, _self: Data) {
policy_id == "foo"
}
}
test test_1() {
foo.mint(Void, Void, "foo", Void)
}
"#;
assert!(check_validator(parse(source_code)).is_ok())
}
#[test]
fn validator_by_name_unknown_handler() {
let source_code = r#"