1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
use strict;
use warnings;
use Test::More;
# ABSTRACT: Ensure duplicates are not created with the same group name.
use CPAN::Changes::Release;
use CPAN::Changes::Group;
my $group = CPAN::Changes::Group->new( name => 'GroupName' );
$group->add_changes("This is a test");
my $dup = CPAN::Changes::Group->new( name => 'GroupName' );
$group->add_changes("This is also a test");
my $release = CPAN::Changes::Release->new();
$release->attach_group($group);
$release->attach_group($dup);
my @groups = $release->groups;
is( scalar @groups, 1, 'Only 1 group added' );
done_testing;
|