1use Mojo::Base -strict;
2use Test::More;
3use Test::Mojo;
4
5plan skip_all => 'Cannot run as root' if $< == 0 or $> == 0;
6
7{
8  use Toadfarm -test;
9  mount 't::lib::Test' => {Host => 'thorsen.pm'};
10  mount 't::lib::Test';
11  secrets qw( s3cret yesterday );
12  start;
13}
14
15my $t = Test::Mojo->new;
16
17is_deeply $t->app->secrets, [qw( s3cret yesterday )], 'toadfarm secrets';
18
19$t->get_ok('/secrets')->content_is('["s3cret","yesterday"]');
20$t->get_ok('/secrets', {Host => 'thorsen.pm'})->content_is('["s3cret","yesterday"]');
21
22done_testing;
23