MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_new_command_fields

Function test_new_command_fields

atomic-cli/src/commands/identity/new.rs:309–327  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

307
308 #[test]
309 fn test_new_command_fields() {
310 let cmd = New {
311 name: "alice".to_string(),
312 email: Some("alice@example.com".to_string()),
313 identity_type: "user".to_string(),
314 usage: "personal".to_string(),
315 description: Some("Test identity".to_string()),
316 set_default: true,
317 set_default_for_usage: false,
318 };
319
320 assert_eq!(cmd.name, "alice");
321 assert_eq!(cmd.email, Some("alice@example.com".to_string()));
322 assert_eq!(cmd.identity_type, "user");
323 assert_eq!(cmd.usage, "personal");
324 assert_eq!(cmd.description, Some("Test identity".to_string()));
325 assert!(cmd.set_default);
326 assert!(!cmd.set_default_for_usage);
327 }
328}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected