@@ -690,14 +690,22 @@ func TestMessageListParams_FromQuery(t *testing.T) {
690690 queryData : map [string ][]string {
691691 "broadcast_id" : {"not-a-uuid" }, // Not a UUID format
692692 },
693- wantErr : true ,
693+ want : MessageListParams {
694+ BroadcastID : "not-a-uuid" ,
695+ Limit : 20 , // Default limit
696+ },
697+ wantErr : false ,
694698 },
695699 {
696700 name : "with invalid template_id" ,
697701 queryData : map [string ][]string {
698702 "template_id" : {"not-a-uuid" }, // Not a UUID format
699703 },
700- wantErr : true ,
704+ want : MessageListParams {
705+ TemplateID : "not-a-uuid" ,
706+ Limit : 20 , // Default limit
707+ },
708+ wantErr : false ,
701709 },
702710 {
703711 name : "with invalid time range (sent)" ,
@@ -977,14 +985,22 @@ func TestMessageListParams_Validate(t *testing.T) {
977985 params : MessageListParams {
978986 BroadcastID : "not-a-uuid" ,
979987 },
980- wantErr : true ,
988+ want : MessageListParams {
989+ BroadcastID : "not-a-uuid" ,
990+ Limit : 20 , // Default limit
991+ },
992+ wantErr : false ,
981993 },
982994 {
983995 name : "invalid template ID" ,
984996 params : MessageListParams {
985997 TemplateID : "not-a-uuid" ,
986998 },
987- wantErr : true ,
999+ want : MessageListParams {
1000+ TemplateID : "not-a-uuid" ,
1001+ Limit : 20 , // Default limit
1002+ },
1003+ wantErr : false ,
9881004 },
9891005 {
9901006 name : "valid time ranges" ,
0 commit comments