mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-28 12:16:53 -06:00
15 lines
535 B
Rust
15 lines
535 B
Rust
//! #776: callers from outside are checked with `check_params`; `Session::execute` itself takes
|
|
//! what it is given, so a journal written by an older version still replays.
|
|
|
|
use designcraft_engine::{Session, check_params};
|
|
use serde_json::json;
|
|
|
|
#[test]
|
|
fn execute_replays_what_the_check_refuses() {
|
|
let mut s = Session::new();
|
|
s.execute("file.new", &json!({})).unwrap();
|
|
let params = json!({"bogus": 1});
|
|
assert!(check_params("style.list", ¶ms).is_err());
|
|
assert!(s.execute("style.list", ¶ms).is_ok());
|
|
}
|