#!perl
use Cassandane::Tiny;

sub test_maxmsg_unlimited
    :JMAPExtensions
    ($self)
{
    # should be able to upload lots of contacts
    my $carddav = $self->{carddav};
    my $addrbookid = $carddav->NewAddressBook('foo');
    $self->assert_not_null($addrbookid);
    foreach my $i (1..$self->LOTS) {
        $self->put_vcard($addrbookid);
    }

    # should be able to upload lots of calendar events
    my $caldav = $self->{caldav};
    my $calendarid = $caldav->NewCalendar({name => 'mycalendar'});
    $self->assert_not_null($calendarid);
    foreach my $i (1..$self->LOTS) {
        $self->put_vevent($calendarid);
    }

    # should be able to upload lots of sieve scripts
    foreach my $i (1..$self->LOTS) {
        $self->put_script();
    }

    # should be able to upload lots of jmap submissions
    foreach my $i (1..$self->LOTS) {
        $self->put_submission();
    }

    # should be able to upload lots of regular emails
    foreach my $i (1..$self->LOTS) {
        $self->put_email();
    }
}
