blob: 5570d0dfa2ce1117c3526daabe80fbd5dd874dae [file] [log] [blame]
Akron8f8deda2021-01-15 12:55:06 +01001use Mojo::Base -strict;
2use Test::More;
3use Test::Mojo;
4
5our %ENV;
6
7my $app = Test::Mojo->new('Kalamar')->app;
8is($app->korap->api, 'https://korap.ids-mannheim.de/api/v1.0/');
9
10
11$ENV{KALAMAR_API} = 'https://example.com/';
12$app = Test::Mojo->new('Kalamar')->app;
13is($app->korap->api, 'https://example.com/v1.0/');
14
15$app = Test::Mojo->new('Kalamar' => {
16 Kalamar => {
17 api_path => 'https://example.org/'
18 }
19})->app;
20is($app->korap->api, 'https://example.org/v1.0/');
21
22$ENV{KALAMAR_API} = undef;
23$app = Test::Mojo->new('Kalamar' => {
24 Kalamar => {
25 api_version => '1.1'
26 }
27})->app;
28is($app->korap->api, 'https://korap.ids-mannheim.de/api/v1.1/');
29
30
31done_testing;
32__END__