#!perl
use Cassandane::Tiny;

sub test_addressbook_get_default
    :min_version_3_9 :needs_component_jmap :needs_dependency_icalvcard
{
    my ($self) = @_;

    my $jmap = $self->{jmap};

    # XXX - A previous CardDAV test might have created the default
    # addressbook already. To make this test self-sufficient, we need
    # to create a test user just for this test. How?
    xlog $self, "get default addressbook";
    my $res = $jmap->CallMethods([['AddressBook/get', {ids => ["Default"]}, "R1"]]);
    $self->assert_str_equals("Default", $res->[0][1]{list}[0]{id});
}
