Debian Codegraph @

t/dsl/yaml.t

raw
1 use strict;
2 use warnings;
3 use Test::More tests => 2;
4 use Plack::Test;
5 use HTTP::Request::Common;
6
7 {
8 package App;
9 use Dancer2;
10 get '/' => sub {
11 my $app = app;
12
13 my %test = (foo => 'bar');
14
15 ::is( to_yaml(\%test), "---\nfoo: bar\n", 'to_yaml works' );
16 ::is_deeply( from_yaml(to_yaml(\%test)), \%test, 'from_yaml works' );
17 };
18 }
19
20 Plack::Test->create( App->to_app )->request( GET '/' );