### ----------------------------------------------------
### -- Path::Router
### -- Licenses: Artistic-2.0
### -- Authors: Sterling Hanenkamp (hanenkamp@cpan.org)
### -- File: t/011_incorrect_validation_warning.t
### ----------------------------------------------------
#!/usr/bin/perl6

use v6;

use Test;

use Path::Router;

my $router = Path::Router.new;

throws-like(
    {
        $router.add-route(
            '/foo/:bar' => %(
                validations => {
                    baz => 'Int',
                },
            ),
        );
    },
    X::Path::Router::BadRoute,
    'creating routes with mismatch between path and validations fails',
    validation => 'baz',
    path       => '/foo/:bar',
);

done-testing;


