diff --git a/crates/cli/src/commands/event.rs b/crates/cli/src/commands/event.rs index 28f706a..ddd553b 100644 --- a/crates/cli/src/commands/event.rs +++ b/crates/cli/src/commands/event.rs @@ -474,6 +474,24 @@ mod tests { ); } + #[test] + fn test_parse_event_list_deduplicates_shorthand_and_canonical_names() { + let events = parse_event_list(&[ + "put,s3:ObjectCreated:*".to_string(), + "GET,s3:ObjectAccessed:*".to_string(), + "delete,s3:ObjectRemoved:*".to_string(), + ]); + + assert_eq!( + events, + vec![ + "s3:ObjectAccessed:*".to_string(), + "s3:ObjectCreated:*".to_string(), + "s3:ObjectRemoved:*".to_string(), + ] + ); + } + #[test] fn test_infer_target_from_arn() { assert_eq!(