MCPcopy Create free account
hub / github.com/Moosync/Moosync / test_has_key

Function test_has_key

src-tauri/preferences/src/test.rs:255–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

253
254#[test]
255fn test_has_key() -> Result<()> {
256 let test_dir = setup_test_dir();
257
258 let prefs = PreferenceConfig::new(test_dir.clone())?;
259
260 // Save test data
261 prefs.save_selective("exists_key".to_string(), Some("test_value"))?;
262
263 // Check keys
264 assert!(prefs.has_key("exists_key"), "Key should exist");
265 assert!(!prefs.has_key("nonexistent_key"), "Key should not exist");
266
267 cleanup_test_dir(test_dir);
268 Ok(())
269}
270
271#[test]
272fn test_preference_events() -> Result<()> {

Callers

nothing calls this directly

Calls 4

setup_test_dirFunction · 0.85
cleanup_test_dirFunction · 0.85
cloneMethod · 0.80
save_selectiveMethod · 0.80

Tested by

no test coverage detected