MCPcopy Create free account
hub / github.com/clawshell/clawshell / test_remove

Function test_remove

src/oauth/storage.rs:116–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114
115 #[test]
116 fn test_remove() {
117 let dir = tempfile::tempdir().unwrap();
118 let storage = TokenStorage::new(dir.path().to_path_buf());
119
120 let tokens = test_tokens();
121 storage.save("removable", &tokens).unwrap();
122 assert!(storage.load("removable").unwrap().is_some());
123
124 storage.remove("removable").unwrap();
125 assert!(storage.load("removable").unwrap().is_none());
126 }
127
128 #[test]
129 fn test_remove_nonexistent() {

Callers

nothing calls this directly

Calls 4

test_tokensFunction · 0.85
pathMethod · 0.80
saveMethod · 0.80
removeMethod · 0.80

Tested by

no test coverage detected