(&self)
| 79 | } |
| 80 | |
| 81 | fn new_intent(&self) -> (String, String) { |
| 82 | let output = self.run(&["intent", "new", "Implement a greeting"]); |
| 83 | let id = output |
| 84 | .lines() |
| 85 | .find_map(|line| line.strip_prefix("Created intent: ")) |
| 86 | .unwrap() |
| 87 | .to_string(); |
| 88 | let repo = Repository::open_readonly(self.root()).unwrap(); |
| 89 | let entry = repo.vault_intent_show(&id).unwrap(); |
| 90 | let frontmatter: serde_json::Value = serde_json::from_str(&entry.frontmatter_json).unwrap(); |
| 91 | (id, frontmatter["uid"].as_str().unwrap().to_string()) |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | fn success(output: Output) -> String { |
no test coverage detected