#!perl
use Cassandane::Tiny;

sub test_calendarevent_get_organizermailto
    :min_version_3_4
    ($self)
{
    my ($id, $ical) = $self->icalfile('organizermailto');

    my $event = $self->putandget_vevent($id, $ical);

    my $wantParticipants = hashbag(
        ignore() => {
            '@type' => 'Participant',
            name => 'Organizer',
            roles => {
                'owner' => JSON::true,
            },
            calendarAddress => 'mailto:organizer@local',
        },
        ignore() => {
            '@type' => 'Participant',
            name => 'Attendee',
            calendarAddress => 'mailto:attendee@local',
        },
    );
    $self->assert_cmp_deeply($wantParticipants, $event->{participants});
}
