creator_simctl/
uninstall.rs1use super::{Device, Result, Validate};
2
3impl Device {
4 pub fn uninstall(&self, bundle_id: &str) -> Result<()> {
6 self.simctl()
7 .command("uninstall")
8 .arg(&self.udid)
9 .arg(&bundle_id)
10 .output()?
11 .validate()
12 }
13}
14
15#[cfg(test)]
16mod tests {
17 use serial_test::serial;
18 use std::path::Path;
19
20 use super::*;
21 use crate::mock;
22
23 #[test]
24 #[serial]
25 fn test_uninstall() -> Result<()> {
26 let mut path = Path::new(env!("CARGO_MANIFEST_DIR")).to_path_buf();
27 path.push("tests/Example.app");
28
29 mock::device()?.boot()?;
30 mock::device()?.install(&path)?;
31 mock::device()?.uninstall("com.glacyr.simctl.Example")?;
32 mock::device()?.shutdown()?;
33
34 Ok(())
35 }
36}