()
| 292 | |
| 293 | #[test] |
| 294 | fn remove_edge() { |
| 295 | let mut cache = PermissionCache::new(); |
| 296 | cache.put_edge(1, "doc-1", "folder-1"); |
| 297 | assert_eq!(cache.get_parent(1, "doc-1"), Some("folder-1")); |
| 298 | |
| 299 | cache.remove_edge(1, "doc-1"); |
| 300 | assert_eq!(cache.get_parent(1, "doc-1"), None); |
| 301 | assert!(cache.get_children(1, "folder-1").is_empty()); |
| 302 | } |
| 303 | |
| 304 | #[test] |
| 305 | fn remove_grant() { |
nothing calls this directly
no test coverage detected