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

Function test_team_commands_variants

atomic-cli/src/commands/team/mod.rs:187–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185
186 #[test]
187 fn test_team_commands_variants() {
188 fn check_variant(cmd: &TeamCommands) -> &'static str {
189 match cmd {
190 TeamCommands::List(_) => "list",
191 TeamCommands::Create(_) => "create",
192 TeamCommands::Show(_) => "show",
193 TeamCommands::Update(_) => "update",
194 TeamCommands::Delete(_) => "delete",
195 TeamCommands::Member(_) => "member",
196 }
197 }
198
199 let list = list::TeamList {
200 org: None,
201 format: None,
202 };
203 assert_eq!(check_variant(&TeamCommands::List(list)), "list");
204
205 let create = create::TeamCreate {
206 name: "Backend".to_string(),
207 description: None,
208 visibility: None,
209 org: None,
210 };
211 assert_eq!(check_variant(&TeamCommands::Create(create)), "create");
212
213 let show = show::TeamShow {
214 slug: "backend".to_string(),
215 org: None,
216 format: None,
217 };
218 assert_eq!(check_variant(&TeamCommands::Show(show)), "show");
219 }
220}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected