Google-RestApi
view release on metacpan or search on metacpan
t/unit/Test/Google/RestApi/CalendarApi3/Colors.pm view on Meta::CPAN
package Test::Google::RestApi::CalendarApi3::Colors;
use Test::Unit::Setup;
use Google::RestApi::Types qw( :all );
use aliased 'Google::RestApi::CalendarApi3::Colors';
use parent 'Test::Unit::TestBase';
init_logger;
sub dont_create_mock_spreadsheets { 1; }
sub _constructor : Tests(2) {
my $self = shift;
my $cal_api = mock_calendar_api();
ok my $colors = Colors->new(calendar_api => $cal_api),
'Constructor should succeed';
isa_ok $colors, Colors, 'Constructor returns';
return;
}
sub get : Tests(3) {
my $self = shift;
my $cal_api = mock_calendar_api();
my $colors = $cal_api->colors();
my $result = $colors->get();
ok $result, 'Get returns result';
ok $result->{calendar}, 'Result has calendar colors';
ok $result->{event}, 'Result has event colors';
return;
}
1;
( run in 0.794 second using v1.01-cache-2.11-cpan-800906f7e73 )