#!perl
use Cassandane::Tiny;

sub test_calendarevent_set_recurrence_multivalued
    :min_version_3_1
{
    my ($self) = @_;
    my $jmap = $self->{jmap};

    my $event =  {
        calendarIds => {
            Default => JSON::true,
        },
        title => "title",
        description => "description",
        start => "2015-11-07T09:00:00",
        duration => "PT1H",
        timeZone => "Europe/London",
        showWithoutTime => JSON::false,
        freeBusyStatus => "busy",
        recurrenceRules => [{
            frequency => 'weekly',
            count => 3,
        }, {
            frequency => 'daily',
            count => 4,
        }],
    };

    my $ret = $self->createandget_event($event);
    $event->{id} = $ret->{id};
    $event->{calendarIds} = $ret->{calendarIds};
    $self->assert_normalized_event_equals($event, $ret);
}
