| Akron | 2c2ddbd | 2021-03-05 12:10:27 +0100 | [diff] [blame] | 1 | use Mojo::Base -strict; | 
| 2 | use Test::More; | ||||
| 3 | use Test::Mojo; | ||||
| 4 | use Mojo::JSON qw'decode_json'; | ||||
| 5 | |||||
| 6 | my $t = Test::Mojo->new('Kalamar'); | ||||
| 7 | |||||
| 8 | ok(my $file = $t->app->home->rel_file('kalamar.secret.json')); | ||||
| 9 | ok(-e $file, 'File exists'); | ||||
| 10 | |||||
| 11 | my $secrets = decode_json($file->slurp); | ||||
| 12 | ok(@$secrets >= 1); | ||||
| 13 | ok(length $secrets->[0] >= 5); | ||||
| 14 | |||||
| 15 | ok($file->lstat->mode & 0600); | ||||
| 16 | |||||
| 17 | done_testing; | ||||