File: deprecated_param_keys.t

package info (click to toggle)
libdancer2-perl 1.1.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,648 kB
  • sloc: perl: 8,589; makefile: 9
file content (29 lines) | stat: -rw-r--r-- 627 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use strict;
use warnings;
use Test::More;
use Test::Fatal;
BEGIN { use_ok('Dancer2::Core::Route') }

like( exception {
        Dancer2::Core::Route->new(
            regexp => '/:splat',
            code   => sub {1},
            method => 'get',
        );
    },
    qr{^Named placeholder 'splat' is deprecated},
    'Find deprecation of :splat'
);

like( exception {
        Dancer2::Core::Route->new(
            regexp => '/:captures',
            code   => sub {1},
            method => 'get',
        );
    },
    qr{^Named placeholder 'captures' is deprecated},
    'Find deprecation of :captures',
);

done_testing;