MCPcopy Create free account
hub / github.com/ankddev/envfetch / test_delete_variable_global

Function test_delete_variable_global

src/variables.rs:165–175  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163
164 #[test]
165 fn test_delete_variable_global() {
166 // First try to set a global variable
167 let set_result = set_variable("TEST_GLOBAL_DELETE", "test_value", true);
168
169 // Only test deletion if we could set the variable (i.e., we have admin rights)
170 if set_result.is_ok() {
171 let result = delete_variable("TEST_GLOBAL_DELETE".to_string(), true);
172 assert!(result.is_ok());
173 assert!(env::var("TEST_GLOBAL_DELETE").is_err());
174 }
175 }
176
177 #[test]
178 fn test_delete_nonexistent_variable_global() {

Callers

nothing calls this directly

Calls 2

set_variableFunction · 0.85
delete_variableFunction · 0.85

Tested by

no test coverage detected