#!perl
use Cassandane::Tiny;

sub test_calendarevent_get_links
    :min_version_3_1
    ($self)
{
    my ($id, $ical) = $self->icalfile('links');
    my $uri = "http://jmap.io/spec.html#calendar-events";

    my $links = hashbag(
        ignore() => {
            '@type' => 'Link',
            href => "http://jmap.io/spec.html#calendar-events",
            contentType => "text/html",
            size => 4480,
            title => "the spec",
            rel => "enclosure",
        },
        ignore() => {
            '@type' => 'Link',
            href => "http://example.com/some.url",
        },
        'describedby-attach' => {
            '@type' => 'Link',
            href => "http://describedby/attach",
            rel => "describedby",
        },
    );

    my $event = $self->putandget_vevent($id, $ical);
    $self->assert_cmp_deeply($links, $event->{links});
}
