mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 20:01:07 +01:00
Tests: check where each Export Selection with options writes
The test now asserts that the picked file and the given path receive the two writes, as well as the write count.
This commit is contained in:
1 parent
056083e824
commit
193470f80b
1 file changed
+4
-1
@@ -465,7 +465,10 @@ mod tests {
|
||||
assert_eq!(&written.borrow()[0].1[1..4], b"PNG");
|
||||
app.run("document.exportSelection", json!({"path": "/tmp/sel2.png", "scale": 2})).unwrap();
|
||||
assert_eq!(*asked.borrow(), 1, "a path writes without the save panel");
|
||||
assert_eq!(written.borrow().len(), 2);
|
||||
let w = written.borrow();
|
||||
assert_eq!(w.len(), 2);
|
||||
assert_eq!(w[0].0, "/tmp/sel.png", "the picked file");
|
||||
assert_eq!(w[1].0, "/tmp/sel2.png", "the given path");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user