about summary refs log tree commit diff
path: root/t/02_error.t
blob: 336a5934e73cb97caf60d92bcd1ab407a655c52d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
use warnings;
use Test::More;
use Test::Exception;

package test::api::missing_api_base_url;
use Net::HTTP::API;

net_api_method user => (method => 'GET', path => '/user/');

package main;

ok my $t = test::api::missing_api_base_url->new;
dies_ok { $t->user } 'die with missing url';
like $@, qr/'api_base_url' have not been defined/, 'missing api_base_url';

done_testing;