blib/lib/JMAP/Validation/Generators/ContactGroup.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 29 SCAR 17.9
CC
2
Cov
0%
generate
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 6.0
1 package JMAP::Validation::Generators::ContactGroup;
2  
3 use strict;
4 use warnings;
5  
6 use JMAP::Validation::Generators::String;
7 use JSON::Typist;
8  
9 sub generate {
10 my (%args) = @_;
11  
12 my @contactIds
13 = map { JMAP::Validation::Generators::String->generate() }
14 1..2;
15  
16 my @ContactGroups;
17  
18 foreach my $contactIds ([@contactIds], []) {
19 push @ContactGroups, {
20 ($args{no_id} ? () : (id => JMAP::Validation::Generators::String->generate())),
21 name => JMAP::Validation::Generators::String->generate(),
22 contactIds => $contactIds,
23 };
24 }
25  
26 return @ContactGroups;
27 }
28  
29 1;